Sha256: 7e9c37eda3d47981c07ad1a1bb5989fa2972441a51ba98cc00bd21decc744ec3

Contents?: true

Size: 279 Bytes

Versions: 1

Compression:

Stored size: 279 Bytes

Contents

require 'digest'

module SecretKey
  class SecretKey
    def self.generate_token(key, secret, timestamp)
      raise ArgumentError, 'Time Stamp is not a valid integer.' unless timestamp.is_a? Integer
      Digest::SHA1.hexdigest("#{key}:#{secret}:#{timestamp}")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
secretkey-1.0.0 lib/secretkey.rb