@pluto-encrypted/leveldb
v2.0.1
Published
Secure Encrypted LevelDB storage for @pluto-encrypted/database
Downloads
97
Readme
@pluto-encrypted/leveldb
This package contains a RXDB compatible wrapper over leveldb and can be used as database engine inside @pluto-encrypted package with secure database encryption.
Documentation
How to use
Creating a levelDB compatible storage is very simple.
import { createLevelDBStorage } from "@pluto-encrypted/leveldb";
import { Database } from "@pluto-encrypted/database";
//default password must be 32 bytes long
const defaultPassword = new Uint8Array(32).fill(1);
const database = db = await Database.createEncrypted(
{
name: `my-db`,
encryptionKey: defaultPassword,
storage: createLevelDBStorage({
dbName: "demo",
dbPath: "/tmp/demo"
}),
}
);
QA & Documentation
| Statements | Branches | Functions | Lines | | --------------------------- | ----------------------- | ------------------------- | ----------------- | | | | | |