Class: Alipay::Sign::MD5
- Inherits:
-
Object
- Object
- Alipay::Sign::MD5
- Defined in:
- lib/alipay/sign/md5.rb
Class Method Summary collapse
Class Method Details
.sign(key, string) ⇒ Object
6 7 8 |
# File 'lib/alipay/sign/md5.rb', line 6 def self.sign(key, string) Digest::MD5.hexdigest("#{string}#{key}") end |
.verify?(key, string, sign) ⇒ Boolean
10 11 12 |
# File 'lib/alipay/sign/md5.rb', line 10 def self.verify?(key, string, sign) sign == sign(key, string) end |