@jihyunlab/web-secure-storage
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

@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.

Package Sidebar

Install

npm i @jihyunlab/web-secure-storage

Weekly Downloads

83

Version

1.0.6

License

MIT

Unpacked Size

13.8 kB

Total Files

17

Last publish

Collaborators

  • jihyunlab-donghyun
  • jihyunlab-jh
  • jihyunlab-dh
  • jihyunlab-jmin
  • jihyunlab-phil
  • jihyunlab-dev