1.0.15 • Published 3 years ago

websecure-local-storage v1.0.15

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

websecure-local-storage

JavaScript library of websecure-local-storage.

Node.js (Install)

Requirements:

  • Node.js
  • npm (Node.js package manager)
npm install websecure-local-storage

Usage

ES6 import case:

  • Setup your ENV CRYPT_LOCAL_STORAGE_SECRET
import { secureStorage } from 'websecure-local-storage';

const secureLs = secureStorage();
secureLs.setItem('foo-key','bar-val');

console.log(secureLs.getItem('foo-key')); // bar-val
console.log(localStorage.getItem('foo-key'));// null
console.log(localStorage.getItem('Y2ViZTAzMGIyZjVhY2E0YTYxYWVjNmU3OWUzMGUwZTM2YmU3MTdhOA=='));// U2FsdGVkX1/hB+TTx5wd1JpWIIX1WHTS96tGvYMtUmQ=

If CRYPT_LOCAL_STORAGE_SECRET is not set, only the keys are encrypted

Engine

Encrypt localStorage keys: SHA1 <- BASE64 Encrypt/Decrypt localStorage values: AES Encrypt/Decrypt secret: ENV CRYPT_LOCAL_STORAGE_SECRET

Release notes

1.0.x

This is an initia release.

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago