starting with encrypted storage

This commit is contained in:
Manuel Araoz 2014-04-15 16:31:00 -03:00
commit f84180e76c
4 changed files with 54 additions and 12 deletions

View file

@ -3,7 +3,6 @@
var imports = require('soop').imports();
function Storage() {
this.data = {};
}
Storage.prototype._read = function(k) {
@ -42,12 +41,12 @@ Storage.prototype.get = function(walletId, k) {
// set value for key
Storage.prototype.set = function(walletId, k,v) {
localStorage.setItem(this._key(walletId,k), JSON.stringify(v));
this.setGlobal(this._key(walletId,k), v);
};
// remove value for key
Storage.prototype.remove = function(walletId, k) {
localStorage.removeItem(this._key(walletId,k));
this.removeGlobal(this._key(walletId,k));
};
// remove all values