module Protocol::WebSocket::Headers::Nounce
Constants
- GUID
Public Class Methods
accept_digest(key)
click to toggle source
Valid for the `SEC_WEBSOCKET_ACCEPT` header.
# File lib/protocol/websocket/headers.rb, line 46 def self.accept_digest(key) Digest::SHA1.base64digest(key + GUID) end
generate_key()
click to toggle source
Valid for the `SEC_WEBSOCKET_KEY` header.
# File lib/protocol/websocket/headers.rb, line 41 def self.generate_key SecureRandom.base64(16) end