Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Commit

Permalink
Add basic usage info
Browse files Browse the repository at this point in the history
  • Loading branch information
maxdeviant committed May 15, 2016
1 parent b33f6cf commit 0758699
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# redux-persist-transform-encrypt
Encrypt your Redux store.

## Usage

```js
import createEncryptor from 'redux-persist-transform-encrypt';

const encryptor = createEncryptor({
secretKey: 'my-super-secret-key'
});

persistStore(store, {
transforms: [
encryptor
]
});

```
6 changes: 3 additions & 3 deletions test/spec.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { expect } from 'chai';
const createTransform = require('../');
const createEncryptor = require('../');

describe('redux-persist-transform-encrypt', () => {
it('can encrypt incoming state', () => {
const encryptTransform = createTransform({
const encryptTransform = createEncryptor({
secretKey: 'redux-is-awesome'
});

Expand All @@ -19,7 +19,7 @@ describe('redux-persist-transform-encrypt', () => {
});

it('can decrypt outgoing state', () => {
const encryptTransform = createTransform({
const encryptTransform = createEncryptor({
secretKey: 'redux-is-awesome'
});

Expand Down

0 comments on commit 0758699

Please sign in to comment.