[v5] Update asmcrypto.js; fix CI (#1178)
This commit is contained in:
parent
2382482090
commit
1f1ffedaf4
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -448,8 +448,8 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"asmcrypto.js": {
|
"asmcrypto.js": {
|
||||||
"version": "github:openpgpjs/asmcrypto#475cffa5ccb2cf2556427056679414acf3610d1b",
|
"version": "github:openpgpjs/asmcrypto#5b994303a9d3e27e0915f72a10b6c2c51535a4dc",
|
||||||
"from": "github:openpgpjs/asmcrypto#475cffa5ccb2cf2556427056679414acf3610d1b",
|
"from": "github:openpgpjs/asmcrypto#5b994303a9d3e27e0915f72a10b6c2c51535a4dc",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"asn1.js": {
|
"asn1.js": {
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
"@rollup/plugin-commonjs": "^11.1.0",
|
"@rollup/plugin-commonjs": "^11.1.0",
|
||||||
"@rollup/plugin-node-resolve": "^7.1.3",
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
||||||
"@rollup/plugin-replace": "^2.3.2",
|
"@rollup/plugin-replace": "^2.3.2",
|
||||||
"asmcrypto.js": "github:openpgpjs/asmcrypto#475cffa5ccb2cf2556427056679414acf3610d1b",
|
"asmcrypto.js": "github:openpgpjs/asmcrypto#5b994303a9d3e27e0915f72a10b6c2c51535a4dc",
|
||||||
"babel-eslint": "^10.1.0",
|
"babel-eslint": "^10.1.0",
|
||||||
"bn.js": "^4.11.8",
|
"bn.js": "^4.11.8",
|
||||||
"buffer": "^5.0.8",
|
"buffer": "^5.0.8",
|
||||||
|
|
|
@ -124,13 +124,13 @@ function aesEncrypt(algo, key, pt, iv) {
|
||||||
}
|
}
|
||||||
// asm.js fallback
|
// asm.js fallback
|
||||||
const cfb = new AES_CFB(key, iv);
|
const cfb = new AES_CFB(key, iv);
|
||||||
return stream.transform(pt, value => cfb.AES_Encrypt_process(value), () => cfb.AES_Encrypt_finish());
|
return stream.transform(pt, value => cfb.aes.AES_Encrypt_process(value), () => cfb.aes.AES_Encrypt_finish());
|
||||||
}
|
}
|
||||||
|
|
||||||
function aesDecrypt(algo, key, ct, iv) {
|
function aesDecrypt(algo, key, ct, iv) {
|
||||||
if (util.isStream(ct)) {
|
if (util.isStream(ct)) {
|
||||||
const cfb = new AES_CFB(key, iv);
|
const cfb = new AES_CFB(key, iv);
|
||||||
return stream.transform(ct, value => cfb.AES_Decrypt_process(value), () => cfb.AES_Decrypt_finish());
|
return stream.transform(ct, value => cfb.aes.AES_Decrypt_process(value), () => cfb.aes.AES_Decrypt_finish());
|
||||||
}
|
}
|
||||||
return AES_CFB.decrypt(ct, key, iv);
|
return AES_CFB.decrypt(ct, key, iv);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user