Update aes-js to 3.1.0

This commit is contained in:
Alex Beregszaszi 2018-02-03 23:24:28 +00:00
parent d483e5ee31
commit 52f0ca9eeb
2 changed files with 4 additions and 3 deletions

View File

@ -26,7 +26,7 @@
},
"homepage": "https://github.com/ethereumjs/ethereumjs-wallet",
"dependencies": {
"aes-js": "^0.2.3",
"aes-js": "^3.1.0",
"bs58check": "^2.1.1",
"ethereumjs-util": "^5.1.4",
"hdkey": "^0.7.0",

View File

@ -203,9 +203,10 @@ Thirdparty.fromKryptoKit = function (entropy, password) {
/* eslint-disable new-cap */
var decipher = new aesjs.ModeOfOperation.ecb(aesKey)
/* eslint-enable new-cap */
/* decrypt returns an Uint8Array, perhaps there is a better way to concatenate */
privKey = Buffer.concat([
decipher.decrypt(encryptedSeed.slice(0, 16)),
decipher.decrypt(encryptedSeed.slice(16, 32))
Buffer.from(decipher.decrypt(encryptedSeed.slice(0, 16))),
Buffer.from(decipher.decrypt(encryptedSeed.slice(16, 32)))
])
if (checksum.length > 0) {