Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface EncryptionConfiguration

example
const iv = window.crypto.getRandomBytes(new UintArray(16));
const key = window.crypto.getRandomBytes(new UintArray(8));

export const lockbox = stores.utils.withEncryption(stores.memoryStore(), { key, iv });

Hierarchy

  • EncryptionConfiguration

Index

Properties

Properties

iv: string

The initialization vector to use when encrypting. Must be at least 7 characters long. The same value should be provided on subsequent store instantiations, so a value that is unique to the user (such as a GUID) is recommended.

key: string

The private key to use to encrypt values in the store. The same key will need to be provided on subsequent encrypted store instantiations, so a value that is unique to the user (and unguessable by other users) is recommended. Any string of any length can be used.