Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10 add support for custom storage type - [NEEDS WORK] #11

Closed
Closed
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ var ls = new SecureLS();
| --------------------- | -------------- | ----------------------------------------- |
| **encodingType** | Base64 | `base64`/`aes`/`des`/`rabbit`/`rc4`/`''` |
| **isCompression** | `true` | `true`/`false` |
| **encryptionSecret** | PBKDF2 value | String |
| **encryptionSecret** | PBKDF2 value | String |
| **storageType** | localStorage | Object |

**Note:** `encryptionSecret` will only be used for the Encryption and Decryption of data with `AES`, `DES`, `RC4`, `RABBIT`, and the library will discard it if no encoding / Base64 encoding method is choosen.

Expand Down Expand Up @@ -151,6 +152,12 @@ var ls = new SecureLS({encodingType: 'rc4', isCompression: false});
var ls = new SecureLS({encodingType: 'rc4', isCompression: false, encryptionSecret: 's3cr3tPa$$w0rd@123'});
```

* Persisting data in sessionStorage instead of localStorage

```
var ls = new SecureLS({storageType: sessionStorage});
```


#### Methods

Expand Down
94 changes: 73 additions & 21 deletions dist/secure-ls.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/secure-ls.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/secure-ls.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/secure-ls.min.js.map

Large diffs are not rendered by default.