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

    Function verifyStream

    • Verify the signature of a message inside a stream with the specified hash/digest algorithm.

      Parameters

      • algo:
            | "md5"
            | "ripemd160"
            | "sha1"
            | "sha224"
            | "sha256"
            | "sha3-224"
            | "sha3-256"
            | "sha3-384"
            | "sha3-512"
            | "sha384"
            | "sha512"

        The hash/digest algorithm to use.

      • publicKey: string | Buffer<ArrayBufferLike> | KeyObject

        The public key to verify the message with.

      • message: Readable

        The payload to be verified, which is a readable stream.

      • signature: Buffer

        The signature of the payload to be verified, must be a Buffer.

      • Optionalopts: IRsaOptions

        The options for verification, including the padding algorithm.

      Returns Promise<boolean>

      Return a Promise that resolves to true if the signature is valid, otherwise false.

      E_INVALID_PUBLIC_KEY If the public key is not a valid RSA public key.

      E_VERIFY_FAILED If the verification fails.