Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Commit 52f0ca9

Browse files
committed
Update aes-js to 3.1.0
1 parent d483e5e commit 52f0ca9

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"homepage": "https://github.com/ethereumjs/ethereumjs-wallet",
2828
"dependencies": {
29-
"aes-js": "^0.2.3",
29+
"aes-js": "^3.1.0",
3030
"bs58check": "^2.1.1",
3131
"ethereumjs-util": "^5.1.4",
3232
"hdkey": "^0.7.0",

thirdparty.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,10 @@ Thirdparty.fromKryptoKit = function (entropy, password) {
203203
/* eslint-disable new-cap */
204204
var decipher = new aesjs.ModeOfOperation.ecb(aesKey)
205205
/* eslint-enable new-cap */
206+
/* decrypt returns an Uint8Array, perhaps there is a better way to concatenate */
206207
privKey = Buffer.concat([
207-
decipher.decrypt(encryptedSeed.slice(0, 16)),
208-
decipher.decrypt(encryptedSeed.slice(16, 32))
208+
Buffer.from(decipher.decrypt(encryptedSeed.slice(0, 16))),
209+
Buffer.from(decipher.decrypt(encryptedSeed.slice(16, 32)))
209210
])
210211

211212
if (checksum.length > 0) {

0 commit comments

Comments
 (0)