Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::net::ws::WebsocketAuthenticator Class Referencefinal

Websocket Authenticator. More...

#include <WebsocketAuthenticator.h>

Inheritance diagram for sese::net::ws::WebsocketAuthenticator:
sese::NotInstantiable

Public Member Functions

 WebsocketAuthenticator ()=delete
 
- Public Member Functions inherited from sese::NotInstantiable
 NotInstantiable ()=delete
 
virtual ~NotInstantiable ()=default
 
 NotInstantiable (const NotInstantiable &)=delete
 
NotInstantiableoperator= (const NotInstantiable &)=delete
 

Static Public Member Functions

static std::pair< std::unique_ptr< char[]>, std::unique_ptr< char[]> > generateKeyPair () noexcept
 
static bool verify (const char *key, const char *result) noexcept
 
static std::unique_ptr< char[]> toResult (const char *key) noexcept
 

Static Private Member Functions

static void generateKey (uint8_t key[16])
 Generate a binary key.
 

Static Private Attributes

static const char * append_string = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
 

Detailed Description

Websocket Authenticator.

Constructor & Destructor Documentation

◆ WebsocketAuthenticator()

sese::net::ws::WebsocketAuthenticator::WebsocketAuthenticator ( )
delete

Member Function Documentation

◆ generateKey()

void sese::net::ws::WebsocketAuthenticator::generateKey ( uint8_t key[16])
staticprivate

Generate a binary key.

◆ generateKeyPair()

std::pair< std::unique_ptr< char[]>, std::unique_ptr< char[]> > sese::net::ws::WebsocketAuthenticator::generateKeyPair ( )
staticnoexcept

Generate key pair

Returns
Key pair

References sese::Base64Converter::encode(), sese::SHA1Util::encode(), and in().

◆ toResult()

std::unique_ptr< char[]> sese::net::ws::WebsocketAuthenticator::toResult ( const char * key)
staticnoexcept

Generate result from key

Parameters
keyKey
Returns
Result

References sese::Base64Converter::encode(), sese::SHA1Util::encode(), and in().

◆ verify()

bool sese::net::ws::WebsocketAuthenticator::verify ( const char * key,
const char * result )
staticnoexcept

Validate key pair

Parameters
keyKey
resultResult
Returns
Validation result

References sese::Base64Converter::encode(), sese::SHA1Util::encode(), in(), and sese::strcmp().

Member Data Documentation

◆ append_string

const char * sese::net::ws::WebsocketAuthenticator::append_string = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
staticprivate

The documentation for this class was generated from the following files: