Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
opt
/
alt
/
ruby21
/
share
/
ri
/
2.1.0
/
system
/
OpenSSL
/
PKey
/
PKey
/
//opt/alt/ruby21/share/ri/2.1.0/system/OpenSSL/PKey/PKey/verify-i.ri
U:RDoc::AnyMethod[iI"verify:ETI"OpenSSL::PKey::PKey#verify;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [ I"BTo verify the +String+ +signature+, +digest+, an instance of ;TI"OOpenSSL::Digest, must be provided to re-compute the message digest of the ;TI"Ioriginal +data+, also a +String+. The return value is +true+ if the ;TI"Psignature is valid, +false+ otherwise. A PKeyError is raised should errors ;TI"occur. ;TI"QAny previous state of the +Digest+ instance is irrelevant to the validation ;TI"Koutcome, the digest instance is reset to its initial state during the ;TI"operation.;To:RDoc::Markup::BlankLine S:RDoc::Markup::Heading: leveli: textI"Example;To:RDoc::Markup::Verbatim; [I"data = 'Sign me!' ;TI"*digest = OpenSSL::Digest::SHA256.new ;TI")pkey = OpenSSL::PKey::RSA.new(2048) ;TI")signature = pkey.sign(digest, data) ;TI"pub_key = pkey.public_key ;TI";puts pub_key.verify(digest, signature, data) # => true;T:@format0: @fileI"ext/openssl/ossl_pkey.c;T:0@omit_headings_from_table_of_contents_below0I"4pkey.verify(digest, signature, data) -> String ;T0[ I"(p1, p2, p3);T@ FI" PKey;TcRDoc::NormalClass00