All Projects → AKASHAorg → secure-webstore

AKASHAorg / secure-webstore

Licence: MIT license
A secure IndexedDB store with built-in encryption

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
HTML
75241 projects

Projects that are alternatives of or similar to secure-webstore

mailserver
Join us, building a full OpenBSD mailserver! (work in progress)
Stars: ✭ 52 (+48.57%)
Mutual labels:  secure
loQL
loQL is a lightweight, open source npm package that caches API requests with service workers, unlocking performance gains and enabling offline use.
Stars: ✭ 49 (+40%)
Mutual labels:  indexeddb
sfsdb
Simple yet extensible database you already know how to use
Stars: ✭ 36 (+2.86%)
Mutual labels:  indexeddb
piping-chat-web
💬 Chat via Piping Server with End-to-End Encryption
Stars: ✭ 22 (-37.14%)
Mutual labels:  secure
Keep-It-Secure-File-Encryption
Keep It Secure Private Data Encryption & Decryption Tool
Stars: ✭ 38 (+8.57%)
Mutual labels:  secure
indexeddb-orm
Indexed DB ORM
Stars: ✭ 53 (+51.43%)
Mutual labels:  indexeddb
otr4j
Off-The-Record messaging encryption written in pure Java
Stars: ✭ 35 (+0%)
Mutual labels:  secure
deeponion
Official Source Repo for DeepOnion - Anonymous Cryptocurrency on TOR
Stars: ✭ 60 (+71.43%)
Mutual labels:  secure
hydralit
A library to create multi-page Streamlit applications with ease.
Stars: ✭ 93 (+165.71%)
Mutual labels:  secure
docker-sftp
SFTP Server for Docker
Stars: ✭ 118 (+237.14%)
Mutual labels:  secure
secure-electron-store
A secure electron-store that uses ipcMain/ipcRenderer.
Stars: ✭ 40 (+14.29%)
Mutual labels:  secure
vault
Is a plugin for project management system Redmine. Allows you to store various passwords/keys in one place for the project.
Stars: ✭ 44 (+25.71%)
Mutual labels:  encryption-key
TheLastTime
C# .NET 5 Blazor WebAssembly Progressive Web Application that tracks when was the last time you did something
Stars: ✭ 23 (-34.29%)
Mutual labels:  indexeddb
vaultssh
A Go based Vault client to support ssh sessions, remote commands and scp transfers all in memory
Stars: ✭ 25 (-28.57%)
Mutual labels:  secure
prsa
RSA Public Key Encryption
Stars: ✭ 18 (-48.57%)
Mutual labels:  encryption-key
go-peer
Library for create secure and anonymity decentralized networks.
Stars: ✭ 74 (+111.43%)
Mutual labels:  secure
memsec
Rust implementation `libsodium/utils`.
Stars: ✭ 39 (+11.43%)
Mutual labels:  secure
typo3-secure-downloads
Secure your assets and data from unwanted download. Apply TYPO3 access rights to ALL file assets (PDFs, TGZs or JPGs etc. - configurable) - protect them from direct access.
Stars: ✭ 15 (-57.14%)
Mutual labels:  secure
rune
tool to query for tokens and passwords for use as environment variables
Stars: ✭ 13 (-62.86%)
Mutual labels:  secure
mTower
mTower is Trusted Execution Environment specially designed to be used on MicroController Units (MCUs) supporting ARM TrustZone technology (e.g., Cortex-M23/33/35p). mTower operates well under restrictions typical for such environment – small RAM and ROM sizes, relatively low performance, absence of rich OSes providing variety of services availab…
Stars: ✭ 34 (-2.86%)
Mutual labels:  secure

Secure-webstore

Build Status

This is a secure, promise-based keyval store that encrypts data stored in IndexedDB.

The symmetric encryption key is derived from the provided passphrase, and then stored in an encrypted form within the provided store name. The encryption key is only used in memory and never revealed.

The IndexedDB wrapper used internally is idb-keyval, while the cryptographic operations are handled by easy-web-crypto, a zero-dependency wrapper around the Webcrypto API available in modern browsers.

Huge thanks to @Jopie64 for Typescriptifying the source!

Installing

Via npm

npm install --save secure-webstore

Via <script> tag

Either host dist/cjs/secure-webstore.js yourself or use a CDN (e.g. jsDelivr) like this:

<script type="application/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cjs/secure-webstore.js"></script>

You can then use window.SecureStore to access the library.

Usage

Initialize

The init step takes care of key derivation and setting up the encryption/decryption key.

const Store = require('secure-webstore').Store

const store = new Store('some-store-name', 'super-secure-passphrase')

store.init().then(() => {
  // store is ready
})

set:

store.set('hello', 'world')

Since this is IDB-backed, you can store anything structured-clonable (numbers, arrays, objects, dates, blobs etc).

All methods return promises:

store.set('hello', 'world')
  .then(() => console.log('It worked!'))
  .catch(err => console.log('It failed!', err))

get:

// logs: "world"
const val = await store.get('hello')
// console.log(val) -> "world"

If there is no 'hello' key, then val will be undefined.

keys:

// logs: ["hello", "foo"]
keys().then(keys => console.log(keys))

del:

store.del('hello')

clear:

store.clear()

destroy:

Completely remove a database.

store.destroy()

updatePassphrase:

Update the passphrase that is used for key derivation. The encryption key used for data will not be affected, just the key that protects it.

store.updatePassphrase(oldPass, newPass)

export:

Export all (encrypted) key/vals as one JSON object.

const dump = await store.export()

import:

// using the dump above
store.import(dump)

That's it!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].