Interface Crypto

Contains the properties required to configure the encryption of Message payloads.

Hierarchy

  • Crypto

Methods

  • Generates a random key to be used in the encryption of the channel. If the language cryptographic randomness primitives are blocking or async, a callback is used. The callback returns a generated binary key.

    Parameters

    • Optional keyLength: number

      The length of the key, in bits, to be generated. If not specified, this is equal to the default keyLength of the default algorithm: for AES this is 256 bits.

    Returns Promise<CipherKey>

    A promise which, upon success, will be fulfilled with the generated key as a binary, for example, a byte array. Upon failure, the promise will be rejected with an ErrorInfo object which explains the error.

Generated using TypeDoc