1.0.15 • Published 4 years ago

websecure-local-storage v1.0.15

Weekly downloads
-
License
MIT
Repository
-
Last release
4 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

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago