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

@ -157,4 +157,14 @@ Storage.prototype.clearAll = function() {
localStorage.clear();
};
Storage.prototype.export = function(obj) {
var encryptedObj = this._encryptObj(obj);
return encryptedObj;
};
Storage.prototype.import = function(base64) {
var decryptedObj = this._decryptObj(base64);
return decryptedObj;
};
module.exports = require('soop')(Storage);