|
@@ -6,6 +6,8 @@ const aeskey: CryptoJS.lib.WordArray = CryptoJS.enc.Utf8.parse('F7A72DE7D6264530
|
|
|
const macKeyLeft: CryptoJS.lib.WordArray = CryptoJS.enc.Hex.parse('B0FB83E39A5EBFAA'); // 这里要用CryptoJS.enc.Hex.parse,CryptoJS.enc.Utf8.parse返回是16位的
|
|
const macKeyLeft: CryptoJS.lib.WordArray = CryptoJS.enc.Hex.parse('B0FB83E39A5EBFAA'); // 这里要用CryptoJS.enc.Hex.parse,CryptoJS.enc.Utf8.parse返回是16位的
|
|
|
/** MAC检验码右8字节 */
|
|
/** MAC检验码右8字节 */
|
|
|
const macKeyRight: CryptoJS.lib.WordArray = CryptoJS.enc.Hex.parse('BE471362A58393FF');
|
|
const macKeyRight: CryptoJS.lib.WordArray = CryptoJS.enc.Hex.parse('BE471362A58393FF');
|
|
|
|
|
+/** Phone AES密钥 */
|
|
|
|
|
+const phoneaeskey: CryptoJS.lib.WordArray = CryptoJS.enc.Utf8.parse('0d299ce2d4105282f7471074cb0f9f9d');
|
|
|
/** MAC检验向量 */
|
|
/** MAC检验向量 */
|
|
|
const iv = new Uint8Array([0xd9, 0x51, 0xdb, 0xe0, 0x37, 0xc8, 0x23, 0x25]);
|
|
const iv = new Uint8Array([0xd9, 0x51, 0xdb, 0xe0, 0x37, 0xc8, 0x23, 0x25]);
|
|
|
|
|
|
|
@@ -160,7 +162,7 @@ export const decrypt50 = (encryptData: Uint8Array, size: number): Uint8Array | n
|
|
|
const cipherParams = CryptoJS.lib.CipherParams.create({
|
|
const cipherParams = CryptoJS.lib.CipherParams.create({
|
|
|
ciphertext: uint8ArrayToWordArray(encryptData),
|
|
ciphertext: uint8ArrayToWordArray(encryptData),
|
|
|
});
|
|
});
|
|
|
- const decrytped = CryptoJS.AES.decrypt(cipherParams, aeskey, aesOption);
|
|
|
|
|
|
|
+ const decrytped = CryptoJS.AES.decrypt(cipherParams, phoneaeskey, aesOption);
|
|
|
|
|
|
|
|
return wordArrayToUint8Array(decrytped);
|
|
return wordArrayToUint8Array(decrytped);
|
|
|
};
|
|
};
|