@openvireo/sdk - v1.0.0
    Preparing search index...

    Function wrap

    • wrap(key, plaintext, aad) = 0x01 ‖ nonce(24) ‖ XChaCha20-Poly1305(key, nonce, plaintext, aad). nonce is for tests.

      Parameters

      • key: Uint8Array
      • plaintext: Uint8Array
      • aad: string
      • Optionalnonce: Uint8Array<ArrayBufferLike>

      Returns Uint8Array