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.18.0 lib/reapal/sign/md5.rb
reapal-0.17.0 lib/reapal/sign/md5.rb
reapal-0.16.0 lib/reapal/sign/md5.rb
reapal-0.15.0 lib/reapal/sign/md5.rb
reapal-0.14.0 lib/reapal/sign/md5.rb
reapal-0.13.0 lib/reapal/sign/md5.rb
reapal-0.12.0 lib/reapal/sign/md5.rb
reapal-0.11.0 lib/reapal/sign/md5.rb
reapal-0.10.1 lib/reapal/sign/md5.rb
reapal-0.10.0 lib/reapal/sign/md5.rb
reapal-0.9.13 lib/reapal/sign/md5.rb
reapal-0.9.12 lib/reapal/sign/md5.rb
reapal-0.9.11 lib/reapal/sign/md5.rb
reapal-0.9.10 lib/reapal/sign/md5.rb
reapal-0.9.9 lib/reapal/sign/md5.rb
reapal-0.9.7 lib/reapal/sign/md5.rb
reapal-0.9.6 lib/reapal/sign/md5.rb
reapal-0.9.5 lib/reapal/sign/md5.rb
reapal-0.9.3 lib/reapal/sign/md5.rb
reapal-0.9.2 lib/reapal/sign/md5.rb