class Polar::SignatureCalculator

Public Class Methods

new(secret_key) click to toggle source
# File lib/polar/signature_calculator.rb, line 6
def initialize(secret_key)
  @secret_key = secret_key
end

Public Instance Methods

calculate(hash) click to toggle source
# File lib/polar/signature_calculator.rb, line 10
def calculate(hash)
  Digest::MD5.hexdigest(hash.collect { |(k, v)| "#{k}=#{v}" }.sort * "" << @secret_key)
end