lib/alipay/sign/rsa.rb in alipay-0.7.1 vs lib/alipay/sign/rsa.rb in alipay-0.8.0
- old
+ new
@@ -4,15 +4,15 @@
module Alipay
module Sign
class RSA
def self.sign(key, string)
rsa = OpenSSL::PKey::RSA.new(key)
- Base64.encode64(rsa.sign('sha1', string))
+ Base64.strict_encode64(rsa.sign('sha1', string))
end
def self.verify?(key, string, sign)
rsa = OpenSSL::PKey::RSA.new(key)
- rsa.verify('sha1', Base64.decode64(sign), string)
+ rsa.verify('sha1', Base64.strict_decode64(sign), string)
end
end
end
end