added encryption backup support

This commit is contained in:
Mario Colque 2014-05-01 18:32:22 -03:00
commit c995f039c2
3 changed files with 21 additions and 0 deletions

View file

@ -68,6 +68,12 @@ WalletFactory.prototype.fromObj = function(obj) {
return w;
};
WalletFactory.prototype.fromEncryptedObj = function(base64, password) {
this.storage._setPassphrase(password);
var walletObj = this.storage.import(base64);
return this.fromObj(walletObj);
};
WalletFactory.prototype.read = function(walletId) {
if (! this._checkRead(walletId))
return false;