Class: SymmetricEncryption::RSAKey
- Inherits:
-
Object
- Object
- SymmetricEncryption::RSAKey
- Defined in:
- lib/symmetric_encryption/rsa_key.rb
Overview
DEPRECATED - Internal use only
Instance Method Summary collapse
-
#decrypt(encrypted_key) ⇒ Object
DEPRECATED - Internal use only.
-
#encrypt(key) ⇒ Object
DEPRECATED - Internal use only.
-
#initialize(private_rsa_key) ⇒ RSAKey
constructor
DEPRECATED - Internal use only.
Constructor Details
#initialize(private_rsa_key) ⇒ RSAKey
DEPRECATED - Internal use only
6 7 8 |
# File 'lib/symmetric_encryption/rsa_key.rb', line 6 def initialize(private_rsa_key) @rsa = OpenSSL::PKey::RSA.new(private_rsa_key) end |
Instance Method Details
#decrypt(encrypted_key) ⇒ Object
DEPRECATED - Internal use only
16 17 18 |
# File 'lib/symmetric_encryption/rsa_key.rb', line 16 def decrypt(encrypted_key) rsa.private_decrypt(encrypted_key) end |
#encrypt(key) ⇒ Object
DEPRECATED - Internal use only
11 12 13 |
# File 'lib/symmetric_encryption/rsa_key.rb', line 11 def encrypt(key) rsa.public_encrypt(key) end |