Sha256: 63125ed4a181efe04897eef883e5f78ba0330c1a809c68ba9e532027c05e24cc

Contents?: true

Size: 303 Bytes

Versions: 27

Compression:

Stored size: 303 Bytes

Contents

# coding: utf-8
module Reapal
  module Sign
    module MD5

      def self.sign(content, key)
        md5 = Digest::MD5.new
        md5 << (content + key)
        md5.hexdigest
      end

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

    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
reapal-0.9.1 lib/reapal/sign/md5.rb
reapal-0.9.0 lib/reapal/sign/md5.rb
reapal-0.3.0 lib/reapal/sign/md5.rb
reapal-0.2.2 lib/reapal/sign/md5.rb
reapal-0.2.1 lib/reapal/sign/md5.rb
reapal-0.2.0 lib/reapal/sign/md5.rb
reapal-0.1.0 lib/reapal/sign/md5.rb