Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

OpenSSL::PKey::PKey#verify_raw

pkey.verify_raw(digest, signature, data [, options]) → true or false

Verifies the signature for the data using a public key pkey. Unlike verify, this method will not hash data with digest automatically.

Returns true if the signature is successfully verified, false otherwise. The caller must check the return value.

See sign_raw for the signing operation and an example code.

Added in version 3.0. See also the man page EVP_PKEY_verify(3).

signature

A String containing the signature to be verified.

See also #verify #verify_recover #to_text also in 4.1 · 4.0 · 3.3 · 3.2 · 3.1