Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "nacl/secretbox"

Index

Functions

generateKey

  • generateKey(prng?: RandomSource): Uint8Array
  • Generates 32-byte random secret key.

    Parameters

    • Optional prng: RandomSource

    Returns Uint8Array

openSecretBox

  • openSecretBox(key: Uint8Array, nonce: Uint8Array, box: Uint8Array): Uint8Array | null
  • Parameters

    • key: Uint8Array
    • nonce: Uint8Array
    • box: Uint8Array

    Returns Uint8Array | null

secretBox

  • secretBox(key: Uint8Array, nonce: Uint8Array, data: Uint8Array): Uint8Array
  • Parameters

    • key: Uint8Array
    • nonce: Uint8Array
    • data: Uint8Array

    Returns Uint8Array

Generated using TypeDoc