Module: JytPay::Sign::Rsa

Defined in:
lib/jyt_pay/sign/rsa.rb

Class Method Summary collapse

Class Method Details

.sign(rsa_private_key, str) ⇒ Object



6
7
8
9
10
# File 'lib/jyt_pay/sign/rsa.rb', line 6

def self.sign(rsa_private_key, str)
  digest = OpenSSL::Digest::SHA1.new
  signature_orig = rsa_private_key.sign(digest, str)
  signature_orig.unpack('H*')[0]
end