module Reapal::Encrypt::RSA

Public Class Methods

decrypt(content, private_key) click to toggle source
# File lib/reapal/encrypt/rsa.rb, line 11
def self.decrypt(content, private_key)
  content_str = Base64.strict_decode64(content)
  private_key.private_decrypt(content_str)
end
encrypt(content, public_key) click to toggle source
# File lib/reapal/encrypt/rsa.rb, line 6
def self.encrypt(content, public_key)
  content_str = public_key.public_encrypt(content)
  Base64.strict_encode64(content_str)
end