starting with encrypted storage
This commit is contained in:
parent
c19e99a99d
commit
f84180e76c
4 changed files with 54 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue