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

    Function hash

    • Calculate the hash/digest of a message using the specified algorithm.

      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 hash/digest algorithm to use.

      • message: string | Buffer<ArrayBufferLike>

        The message to hash, can be a Buffer or a string.

      Returns Buffer

      A Buffer containing the hash/digest of the message.