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

    Function sign

    • Sign simple short data.

      Parameters

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

        The digest/hash algorithm to be used.

      • privateKey: string | Buffer<ArrayBufferLike> | KeyObject

        The private key to sign the data.

      • message: string | Buffer<ArrayBufferLike>

        The payload to be signed.

      • Optionalopts: IEcdsaOptions

        The options for signing.

      Returns Buffer

      Return a Buffer that contains the signature of the payload.