Class: Xmlenc::Algorithms::RSA15
- Inherits:
-
Object
- Object
- Xmlenc::Algorithms::RSA15
- Defined in:
- lib/xmlenc/algorithms/rsa_15.rb
Instance Method Summary collapse
- #decrypt(cipher_value, options = {}) ⇒ Object
- #encrypt(data, option = {}) ⇒ Object
-
#initialize(key) ⇒ RSA15
constructor
A new instance of RSA15.
Constructor Details
#initialize(key) ⇒ RSA15
Returns a new instance of RSA15.
4 5 6 |
# File 'lib/xmlenc/algorithms/rsa_15.rb', line 4 def initialize(key) @key = key end |
Instance Method Details
#decrypt(cipher_value, options = {}) ⇒ Object
8 9 10 |
# File 'lib/xmlenc/algorithms/rsa_15.rb', line 8 def decrypt(cipher_value, = {}) @key.private_decrypt(cipher_value) end |
#encrypt(data, option = {}) ⇒ Object
12 13 14 |
# File 'lib/xmlenc/algorithms/rsa_15.rb', line 12 def encrypt(data, option = {}) @key.public_encrypt(data) end |