Class: OpenSSL::PKey::RSA
- Inherits:
-
Object
- Object
- OpenSSL::PKey::RSA
- Defined in:
- lib/openssl/oaep.rb
Instance Method Summary collapse
- #private_decrypt_oaep(str, label = '', md = nil, mgf1md = nil) ⇒ Object
- #public_encrypt_oaep(str, label = '', md = nil, mgf1md = nil) ⇒ Object
Instance Method Details
#private_decrypt_oaep(str, label = '', md = nil, mgf1md = nil) ⇒ Object
15 16 17 18 |
# File 'lib/openssl/oaep.rb', line 15 def private_decrypt_oaep(str, label = '', md = nil, mgf1md = nil) padded = private_decrypt(str, OpenSSL::PKey::RSA::NO_PADDING) PKCS1.check_oaep_mgf1(padded, label, md, mgf1md) end |
#public_encrypt_oaep(str, label = '', md = nil, mgf1md = nil) ⇒ Object
10 11 12 13 |
# File 'lib/openssl/oaep.rb', line 10 def public_encrypt_oaep(str, label = '', md = nil, mgf1md = nil) padded = PKCS1.add_oaep_mgf1(str, n.num_bytes, label, md, mgf1md) public_encrypt(padded, OpenSSL::PKey::RSA::NO_PADDING) end |