module Wamp::Client::Auth::Cra

Public Class Methods

sign(key, challenge) click to toggle source

Generates the signature from the challenge @param key [String] @param challenge [String]

# File lib/wamp/client/auth.rb, line 12
def self.sign(key, challenge)
  hash  = OpenSSL::HMAC.digest('sha256', key, challenge)
  Base64.encode64(hash).gsub(/\n/,'')
end