Documents for @litert/signatures
    Preparing search index...

    Function sign

    • Sign a message with HMAC.

      Parameters

      • algo:
            | "blake2b512"
            | "blake2s256"
            | "md5"
            | "md5-sha1"
            | "ripemd"
            | "ripemd160"
            | "rmd160"
            | "sha1"
            | "sha224"
            | "sha256"
            | "sha3-224"
            | "sha3-256"
            | "sha3-384"
            | "sha3-512"
            | "sha384"
            | "sha512"
            | "sha512-224"
            | "sha512-256"
            | "sm3"

        The digest/hash algorithm to use.

      • key: string | Buffer<ArrayBufferLike>

        The key to sign the message with.

      • message: string | Buffer<ArrayBufferLike>

        The payload to be signed.

      Returns Buffer

      Return a Buffer that contains the signature of the payload.