Class ServerSideSecretStorageImpl

Implementation of Server-side secret storage.

Secret sharing is not implemented here: this class is strictly about the storage component of SSSS.

Hierarchy

  • ServerSideSecretStorageImpl

Implements

Constructors

Properties

accountDataAdapter: AccountDataClient

interface for fetching and setting account data on the server. Normally an instance of MatrixClient.

application level callbacks for retrieving secret keys

Methods

  • Get a secret from storage, and decrypt it.

    getSecretStorageKey will be called to obtain a secret storage key to decrypt the secret.

    Parameters

    • name: string

      the name of the secret - i.e., the "event type" stored in the account data

    Returns Promise<undefined | string>

    the decrypted contents of the secret, or "undefined" if name is not found in the user's account data.

  • Store an encrypted secret on the server.

    Details of the encryption keys to be used must previously have been stored in account data (for example, via addKey. getSecretStorageKey will be called to obtain a secret storage key to decrypt the secret.

    Parameters

    • name: string

      The name of the secret - i.e., the "event type" to be stored in the account data

    • secret: string

      The secret contents.

    • Optional keys: null | string[]

      The IDs of the keys to use to encrypt the secret, or null/undefined to use the default key.

    Returns Promise<void>

Generated using TypeDoc