mirror of
https://github.com/embarklabs/ethereumjs-wallet.git
synced 2025-01-28 03:15:29 +00:00
Do not fail on an invalid input for EtherWallet
This commit is contained in:
parent
06e1c1dfb4
commit
f97ad5dbe5
@ -109,6 +109,10 @@ Thirdparty.fromEtherWallet = function (input, password) {
|
||||
// decode openssl ciphertext + salt encoding
|
||||
cipher = decodeCryptojsSalt(cipher)
|
||||
|
||||
if (!cipher.salt) {
|
||||
throw new Error('Unsupported EtherWallet key format')
|
||||
}
|
||||
|
||||
// derive key/iv using OpenSSL EVP as implemented in CryptoJS
|
||||
var evp = evp_kdf(new Buffer(password), cipher.salt, { keysize: 32, ivsize: 16 })
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user