Skip to content

Commit

Permalink
Merge 5d21dda into 0681d67
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitanyapotti committed Sep 8, 2020
2 parents 0681d67 + 5d21dda commit 5819b63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ export default class Wallet {
}

const ciphertext = Buffer.from(json.crypto.ciphertext, 'hex')
const mac = keccak256(Buffer.concat([derivedKey.slice(16, 32), ciphertext]))
const mac = keccak256(Buffer.concat([Buffer.from(derivedKey.slice(16, 32)), ciphertext]))
if (mac.toString('hex') !== json.crypto.mac) {
throw new Error('Key derivation failed - possibly wrong passphrase')
}
Expand Down

0 comments on commit 5819b63

Please sign in to comment.