1.0.6 • Published 4 months ago

@jihyunlab/web-secure-storage v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

@jihyunlab/web-secure-storage

Version Downloads Last commit License Linter code style: prettier\ Build Lint codecov

JihyunLab Web secure storage.

Web secure storage can be used by web applications such as React.

Web secure storage encrypts values ​​and stores them in local or session storage. When getting stored values, they are decrypts back to their original values.

Web Secure Storage provides encryption with AES(Advanced Encryption Standard) 256 CBC and Triple-DES 256 CBC.

Additionally, PBKDF2(Password-Based Key Derivation Function 2) and PKCS#7 are used for encryption. Also, since a random iv (Initialization Vector) value is used for encryption, the value cannot be easily inferred.

Requirements

Node.js

Setup

Setup regular JihyunLab Web secure storage

npm i @jihyunlab/web-secure-storage

or

yarn add @jihyunlab/web-secure-storage

Usage

import { SecureStorage, STORAGE, CRYPTO } from '@jihyunlab/web-secure-storage'

const storage = SecureStorage(STORAGE.LOCAL, CRYPTO.AES, 'your secret key', 128 /* The number of iterations for PBKDF2 */);

storage.clear();
storage.setItem('item', 'value');
storage.getItem('item');
storage.removeItem('item');

Credits

Authored and maintained by JihyunLab <info@jihyunlab.com>

License

Open source licensed as MIT.

1.0.6

4 months ago

1.0.5

4 months ago

1.0.4

6 months ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago