Module: ChanPay::Encrypt::RSA
- Defined in:
- lib/chan_pay/encrypt/rsa.rb
Class Method Summary collapse
Class Method Details
.encrypt(key, content) ⇒ Object
7 8 9 10 11 |
# File 'lib/chan_pay/encrypt/rsa.rb', line 7 def self.encrypt(key, content) rsa_pkey = OpenSSL::PKey::RSA.new(key) content_str = rsa_pkey.public_encrypt(content) Base64.strict_encode64(content_str) end |