Sha256: 60c5860d16f9b93c5fc4dc8b806752d65a8ba7e001413ad6aaf82de71bec544b

Contents?: true

Size: 265 Bytes

Versions: 7

Compression:

Stored size: 265 Bytes

Contents

require 'digest/md5'

module LlPay
  module Sign
    class MD5
      def self.sign(key, string)
        Digest::MD5.hexdigest("#{string}&key=#{key}")
      end

      def self.verify?(key, string, sign)
        sign == sign(key, string)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ll_pay-0.6.2 lib/ll_pay/sign/md5.rb
ll_pay-0.6.1 lib/ll_pay/sign/md5.rb
ll_pay-0.6.0 lib/ll_pay/sign/md5.rb
ll_pay-0.5.0 lib/ll_pay/sign/md5.rb
ll_pay-0.4.0 lib/ll_pay/sign/md5.rb
ll_pay-0.3.0 lib/ll_pay/sign/md5.rb
ll_pay-0.2.0 lib/ll_pay/sign/md5.rb