Function hmacSha512

  • Create a hash-based message authentication code using HMAC-SHA512 as specified in RFC 4231. Returns a 64-byte Uint8Array.

    Secrets longer than the block byte-length (128 bytes) are hashed before use, shortening their length to the minimum recommended length (64 bytes). See RFC 2104 for details.

    Parameters

    • secret: Uint8Array

      the secret key (recommended length: 64-128 bytes)

    • message: Uint8Array

      the message to authenticate

    • sha512: {
          hash: ((input) => Uint8Array) & ((input) => Uint8Array);
      } = internalSha512

      an implementation of Sha512 (defaults to the internal WASM implementation)

      • hash: ((input) => Uint8Array) & ((input) => Uint8Array)

    Returns Uint8Array

Generated using TypeDoc