Sha256: abd5d3cd087bef0bad509ceb9b2c7c8f80cf006dca98b899cfc4661b04b17242
Contents?: true
Size: 255 Bytes
Versions: 4
Compression:
Stored size: 255 Bytes
Contents
require 'openssl' module Datatrans::Common def sign(*fields) key = Datatrans.sign_key.split(/([a-f0-9][a-f0-9])/).reject(&:empty?) key = key.pack("H*" * key.size) OpenSSL::HMAC.hexdigest(OpenSSL::Digest::MD5.new, key, fields.join) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
datatrans-2.2.1 | lib/datatrans/common.rb |
datatrans-2.2.0 | lib/datatrans/common.rb |
datatrans-2.1.0 | lib/datatrans/common.rb |
datatrans-2.0.0 | lib/datatrans/common.rb |