Quick start
npm install @consealdev/consealThe crypto core is built only on the browser’s SubtleCrypto. Generate a key, seal a record with it and open it again:
import { generateAesKey, seal, unseal } from '@consealdev/conseal';
const key = await generateAesKey();const { ciphertext, iv } = await seal(key, plaintext);
const opened = await unseal(key, ciphertext, iv);seal gives each record a fresh random IV, which is stored beside its ciphertext. unseal throws if the key is wrong or
the data was changed.
To share the key between a user’s devices and sync records between them, see Sync.