lib/chan_pay/sign/rsa.rb in chan_pay-0.1.0 vs lib/chan_pay/sign/rsa.rb in chan_pay-0.2.0

- old
+ new

@@ -10,10 +10,12 @@ end def self.verify?(key, hash, sign) content = link_hash(hash) rsa = OpenSSL::PKey::RSA.new(key) - rsa.verify('sha1', Base64.strict_decode64(sign), content) + result = rsa.verify('sha1', Base64.strict_decode64(sign), content) + puts "\nrsa verify:#{result}; 回过来的 sign 为:#{sign}\n" unless result + result end private def self.link_hash(hash)