class JWA::Algorithms::KeyManagement::Rsa15
RSA RSA with PKCS1 v1.5 algorithm.
Public Class Methods
new(key)
click to toggle source
# File lib/jwa/algorithms/key_management/rsa15.rb, line 6 def initialize(key) @key = key end
Public Instance Methods
decrypt(ciphertext)
click to toggle source
# File lib/jwa/algorithms/key_management/rsa15.rb, line 14 def decrypt(ciphertext) @key.private_decrypt(ciphertext) end
encrypt(plaintext)
click to toggle source
# File lib/jwa/algorithms/key_management/rsa15.rb, line 10 def encrypt(plaintext) @key.public_encrypt(plaintext) end