<commit_before>secure-redis-store
==================

A simple wrapper to encrypt and decrypt data stored in redis<commit_msg>first working implementation<commit_after># secure-store-redis

A simple wrapper to encrypt and decrypt data stored in redis. The main point is to ensure that any data you store in redis cannot be accessed by anyone else outside of the process, without the key.


```javascript
var SecureStore = require('secure-store-redis');

var store = new SecureStore({
    prefix: 'myApp:store',
    secret: 'quacks like a duck',
    redis: { // standard redis config object
        host: "127.0.0.1",
        port: 6379
    }
});

store.save('quote', 'i see dead people');

store.get('quote'); // returns 'i see dead people'
store.get('blahblah'); // return undefined

var otherStore = new SecureStore({
    prefix: 'myApp:store',
    secret: 'this is the wrong secret',
    redis: { // standard redis config object
        host: "127.0.0.1",
        port: 6379
    }
});

store.get('quote'); // returns undefined
```
{'fraction_non_alphanumeric': 0.13262342691190707, 'fraction_numerical': 0.01936108422071636, 'mean_word_length': 3.4761904761904763, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1233211', 'n_tokens_mistral': 320, 'n_tokens_neox': 300, 'n_words': 115}