Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

OpenSSL::PKey::RSA#private_decrypt

rsa.private_decrypt(string) => String
rsa.private_decrypt(string, padding) => String

Decrypt string, which has been encrypted with the public key, with the private key. padding defaults to PKCS1_PADDING.

See also #private? #private_encrypt #params #public? also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1