Remove Storage and Profile, Move folders, add EncryptedInsightStorage
This commit is contained in:
parent
de90f3eec2
commit
61b677498b
20 changed files with 374 additions and 1067 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* Small module for some helpers that wrap sjcl with some good practices.
|
||||
*/
|
||||
var sjcl = require('../../lib/sjcl');
|
||||
var sjcl = require('sjcl');
|
||||
var log = require('../log.js');
|
||||
var _ = require('underscore');
|
||||
|
||||
|
|
@ -26,6 +26,9 @@ module.exports = {
|
|||
* Encrypts symmetrically using a passphrase
|
||||
*/
|
||||
encrypt: function(key, message) {
|
||||
if (!_.isString(message)) {
|
||||
message = JSON.stringify(message);
|
||||
}
|
||||
return sjcl.encrypt(key, message);
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue