左晓为主开发手持机充值管理机
zuoxiao
2024-08-21 6a5879320dfac43155d024814a0a4d794a612696
qiheonlinelibrary/src/main/java/com/dayu/qiheonlinelibrary/tools/BaseNFCHelper.java
@@ -31,6 +31,9 @@
     * 公司密码
     */
    public byte[] companyKey;
    //齐河欧标密码
    public byte[] companyKey2;
    //密码a区
    String companyKeyA;
    //密码B区
@@ -38,7 +41,7 @@
    static {
        System.loadLibrary("qihealone-native-lib");
        System.loadLibrary("qiheonline-native-lib");
    }
    public native String getSafeKey(Object object);
@@ -71,7 +74,11 @@
            //decryptedBytes3 对应202311202048
            companyKeyB = new String(decryptedBytes2, StandardCharsets.UTF_8);
            //010203:qeg4DUWf0ni9JfRWtD2krA==
            byte[] encryptedBytes4 = Base64.decode("qeg4DUWf0ni9JfRWtD2krA==", Base64.DEFAULT);
            byte[] decryptedBytes4 = cipher.doFinal(encryptedBytes4);
            String companyKeyA = new String(decryptedBytes4, StandardCharsets.UTF_8);
            companyKey2 = HexUtil.hexToByteArray(companyKeyA);
        } catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException |
                 BadPaddingException | IllegalBlockSizeException e) {
            e.printStackTrace();