From 0ccc9e4dc2d94c0ade5a84f27679a481062612c6 Mon Sep 17 00:00:00 2001 From: "David Humphrey (:humph) david.humphrey@senecacollege.ca" Date: Fri, 29 Nov 2013 16:00:41 -0500 Subject: [PATCH] Don't encrypt keys --- src/providers/crypto-wrappers.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/providers/crypto-wrappers.js b/src/providers/crypto-wrappers.js index fcd5a03..fbb54c2 100644 --- a/src/providers/crypto-wrappers.js +++ b/src/providers/crypto-wrappers.js @@ -18,8 +18,7 @@ define(function(require) { }; CryptoWrappedContext.prototype.get = function(key, callback) { var that = this; - var encryptedKey = this.encrypt(key); - this.context.get(encryptedKey, function(err, value) { + this.context.get(key, function(err, value) { if(err) { callback(err); return; @@ -31,13 +30,11 @@ define(function(require) { }); }; CryptoWrappedContext.prototype.put = function(key, value, callback) { - var encryptedKey = this.encrypt(key); var encryptedValue = this.encrypt(value); - this.context.put(encryptedKey, encryptedValue, callback); + this.context.put(key, encryptedValue, callback); }; CryptoWrappedContext.prototype.delete = function(key, callback) { - var encryptedKey = this.encrypt(key); - this.context.delete(encryptedKey, callback); + this.context.delete(key, callback); }; // Custom formatting for encryption objects <-> strings