Add method 'createItem' to DB plugins

This commit is contained in:
Esteban Ordano 2014-10-28 15:20:43 -03:00
commit 5eade81294
4 changed files with 34 additions and 0 deletions

View file

@ -11,6 +11,9 @@ EncryptedInsightStorage.prototype.getItem = function(name, callback) {
var key = cryptoUtil.kdfbinary(this.password + this.email);
InsightStorage.prototype.getItem.apply(this, [name,
function(err, body) {
if (err) {
return callback(err);
}
var decryptedJson = cryptoUtil.decrypt(key, body);
if (!decryptedJson) {
return callback('Internal Error');