Method __builtin.Nettle.Sign()->jose_sign()
- Method
jose_sign
string(7bit)|zerojose_sign(string(8bit)message,mapping(string(7bit):string(7bit)|int)|voidheaders,.Hash|voidh)- Description
Signs the
messagewith a JOSE JWS signature using hash algorithmhand JOSE headersheaders.- Parameter
message Message to sign.
- Parameter
headers JOSE headers to use. Typically a mapping with a single element
"typ".- Parameter
h Hash algorithm to use. Valid hashes depend on the signature algorithm. The default value depends on the signature algorithm.
- Returns
Returns the signature on success, and
0(zero) on failure (typically that either the hash algorithm is invalid for this signature algorithm),- Note
The default implementation returns
0for all parameters, and can thus serve as a fallback for signature algorithms that don't support or aren't supported by JWS (eg Crypto.DSA).- See also