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

    Function verify

    • Verify the signature of 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 verify the signature with.

      • message: string | Buffer<ArrayBufferLike>

        The payload to be verified.

      • signature: Buffer

        The signature of payload to be verified.

      Returns boolean

      Return true if the signature is valid, otherwise false.