Module: ZQuickblox::Signature
- Defined in:
- lib/zquickblox/signature.rb
Class Method Summary collapse
Class Method Details
.generate_signature(params, secret) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/zquickblox/signature.rb', line 4 def generate_signature(params, secret) pairs = params.map { |key, value| "#{key}=#{value}" } pairs.sort! body = pairs.join("&") return hmac_sha(body, secret) end |