Skip to content
instance method

OpenSSL::PKey::RSA#verify_pss

(::String digest, ::String signature, ::String data, salt_length: :auto | :digest | ::Integer, mgf1_hash: ::String) -> bool
rsa.verify_pss(digest, signature, data, salt_length:, mgf1_hash:) → true | false

Verifies data using the Probabilistic Signature Scheme (RSA-PSS).

The return value is true if the signature is valid, false otherwise. PKeyError will be raised if an error occurs.

See sign_pss for the signing operation and an example code.

Parameters

digest

A String containing the message digest algorithm name.

data

A String. The data to be signed.

salt_length

The length in octets of the salt. Two special values are reserved: :digest means the digest length, and :auto means automatically determining the length based on the signature.

mgf1_hash

The hash algorithm used in MGF1.

See also #translate_padding_mode #to_s also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0