Module: WampClient::Auth::Cra
- Defined in:
- lib/wamp_client/auth.rb
Class Method Summary collapse
-
.sign(key, challenge) ⇒ Object
Generates the signature from the challenge.
Class Method Details
.sign(key, challenge) ⇒ Object
Generates the signature from the challenge
38 39 40 41 |
# File 'lib/wamp_client/auth.rb', line 38 def self.sign(key, challenge) hash = OpenSSL::HMAC.digest('sha256', key, challenge) Base64.encode64(hash).gsub(/\n/,'') end |