Class: Xmlenc::Algorithms::RSA15

Inherits:
Object
  • Object
show all
Defined in:
lib/xmlenc/algorithms/rsa_15.rb

Instance Method Summary collapse

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, options = {})
  @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