Signs digest with the private key.
Hash implements the SignerOpts interface and, in most cases, one can
simply pass in the hash function used as opts. Sign may also attempt
to type assert opts to other types in order to obtain algorithm
specific values.
Note that when a signature of a hash of a larger message is needed,
the caller is responsible for hashing the larger message and passing
the hash (as digest) and the hash function (as opts) to Sign.
Parameters:
Name |
Type |
Description |
digest |
Array.<byte>
|
The message to sign |
opts |
Object
|
hashingFunction: the function to use to hash |