Module: TopNotify::Sign

Included in:
Connection
Defined in:
lib/top_notify/sign.rb

Instance Method Summary collapse

Instance Method Details

#sign(params) ⇒ Object



5
6
7
8
# File 'lib/top_notify/sign.rb', line 5

def sign(params)
  stringify = params.sort.map{|s|s[0].to_s + s[1].to_s}.join
  Digest::MD5.hexdigest("#{TopNotify.app_secret}#{stringify}#{TopNotify.app_secret}").upcase
end