module ChanPay::Encrypt::RSA
Public Class Methods
encrypt(key, content)
click to toggle source
# 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