Module: Reapal::Encrypt::RSA
- Defined in:
- lib/reapal/encrypt/rsa.rb
Class Method Summary collapse
Class Method Details
.decrypt(content, private_key) ⇒ Object
11 12 13 14 |
# 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) ⇒ Object
6 7 8 9 |
# 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 |