Secure Encrypted IndexDB storage for @pluto-encrypted/database
npm install @pluto-encrypted/indexdbCreating a IndexDB compatible storage is very simple.
``typescriptmy-db
import IndexDB from "@pluto-encrypted/indexdb";
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: ,``
encryptionKey: defaultPassword,
storage: IndexDB,
}
);