Fixes import & export with new encryption
This commit is contained in:
parent
1b0f6836dc
commit
35bab383b0
12 changed files with 86 additions and 67 deletions
|
|
@ -35,6 +35,19 @@ Compatibility._getWalletIds = function(cb) {
|
|||
return cb(walletIds);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} encryptedWallet - base64-encoded encrypted wallet
|
||||
* @param {string} passphrase - base64-encoded passphrase
|
||||
* @returns {Object}
|
||||
*/
|
||||
Compatibility.importLegacy = function(encryptedWallet, passphrase) {
|
||||
var ret = Compatibility._decrypt(encryptedWallet, passphrase);
|
||||
if (!ret) return null;
|
||||
ret = ret.toString(CryptoJS.enc.Utf8);
|
||||
ret = JSON.parse(ret);
|
||||
return ret;
|
||||
};
|
||||
|
||||
/**
|
||||
* Decrypts using the CryptoJS library (unknown encryption schema)
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue