Method __builtin.Nettle.Hash()->emsa_pss_encode()


Method emsa_pss_encode

string(8bit)|zero emsa_pss_encode(string(8bit) message, int(1..) bits, string(8bit)|void salt, function(string(8bit), int(0..):string(8bit))|void mgf)

Description

This is the signature digest algorithm used in RSASSA-PSS (RFC 3447 section 9.1.1).

Parameter message

Message to sign.

Parameter bits

Number of bits in result.

Parameter salt

Random string to salt the signature. Defaults to the empty string.

Parameter mgf

Mask generation function to use. Defaults to mgf1().

Returns

Returns the signature digest on success and 0 (zero) on failure (typically too few bits to represent the result).

See also

emsa_pss_verify(), mgf1().