Pure JS implementation of SecureStorage API as inspired by http://www.nczonline.net/blog/2010/04/13/towards-more-secure-client-side-data-storage/
Allows the secure storage of client side data within the browser
Encryption provided by Stanford Javascript Crypto Library
/**
* Full format, using a Base64 encoded binary key
*/
openSecureStorage('myStore', AES_256, secureKey, function(store) {
var counter = store.getItem('counter');
if (counter)
counter++;
else
counter = 1;
store.setItem('counter', counter);
});
/**
* Simplified format, using a plain text password and AES_256 cypher
*/
openSecureStorage('myStore', 'MyP4ssw0rd', function(store) {
var counter = store.getItem('counter');
if (counter)
counter++;
else
counter = 1;
store.setItem('counter', counter);
});
/**
* Removing the store
*/
removeSecureStorage('myStore');
bower install secure-storage-js --save