Module: Wamp::Client::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
12 13 14 15 |
# 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 |