Options
All
  • Public
  • Public/Protected
  • All
Menu

A struct containing an open connection to a CryptoStore.

Opening the CryptoStore can take some time, due to the PBKDF calculation involved, so if multiple operations are being done on the same store, it is more efficient to open it once.

Hierarchy

  • StoreHandle

Index

Constructors

Methods

  • free(): void
  • Returns void

  • open(store_name?: string, store_passphrase?: string): Promise<StoreHandle>
  • Open a crypto store.

    The created store will be based on IndexedDB if a store_name is provided; otherwise it will be based on a memory store and once the objects is dropped, the keys will be lost.

    Arguments

    • store_name - The name that should be used to open the IndexedDB based database. If this isn't provided, a memory-only store will be used. Note the memory-only store will lose your E2EE keys when the StoreHandle gets dropped.

    • store_passphrase - The passphrase that should be used to encrypt the store, for IndexedDB-based stores

    Parameters

    • Optional store_name: string
    • Optional store_passphrase: string

    Returns Promise<StoreHandle>

  • openWithKey(store_name: string, store_key: Uint8Array): Promise<StoreHandle>
  • Open a crypto store based on IndexedDB, using the given key for encryption.

    Arguments

    • store_name - The name that should be used to open the IndexedDB based database.

    • store_key - The key that should be used to encrypt the store, for IndexedDB-based stores. Must be a 32-byte array.

    Parameters

    • store_name: string
    • store_key: Uint8Array

    Returns Promise<StoreHandle>

Generated using TypeDoc