securely store encryptation passwords
This commit is contained in:
parent
54f42f8278
commit
929c6ffa6d
2 changed files with 6 additions and 4 deletions
|
|
@ -4,18 +4,20 @@ var imports = require('soop').imports();
|
|||
//var buffertools = imports.buffertools || require('buffertools');
|
||||
var parent = imports.parent || require('./Plain');
|
||||
|
||||
var id = 0;
|
||||
function Storage() {
|
||||
this.__uniqueid = ++id;
|
||||
}
|
||||
Storage.parent = parent;
|
||||
|
||||
|
||||
var passphrase = null;
|
||||
var pps = {};
|
||||
Storage.prototype._getPassphrase = function() {
|
||||
return passphrase;
|
||||
return pps[this.__uniqueid];
|
||||
}
|
||||
|
||||
Storage.prototype._setPassphrase = function(password) {
|
||||
passphrase = password;
|
||||
pps[this.__uniqueid] = password;
|
||||
}
|
||||
|
||||
Storage.prototype._encrypt = function(data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue