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

    Function signStream

    • Sign 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.

      • privateKey: string | Buffer<ArrayBufferLike> | KeyObject

        The private key to sign the message with.

      • message: Readable

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

      • Optionalopts: IRsaOptions

        The options for signing, including the passphrase of the private key and the padding algorithm.

      Returns Promise<Buffer<ArrayBufferLike>>

      Return a Promise that resolves to a Buffer containing the signature of the payload.

      E_INVALID_PRIVATE_KEY If the private key is not a valid RSA private key.

      E_SIGN_FAILED If the signing fails.