libDwmAuth-0.3.6
DwmAuth.hh File Reference

Simple authentication definitions. More...

Include dependency graph for DwmAuth.hh:

Go to the source code of this file.

Functions

std::string Dwm::Auth::GetRandomString (size_t sz)
 Authenticate a client that has connected on the socket fd. More...
 
std::string Dwm::Auth::HexEncodedString (const std::string &s)
 Returns a hexadecimal version of s.
 
std::string Dwm::Auth::Base64Encode (const std::string &s)
 Returns a base64-encoded version of s.
 

Detailed Description

Simple authentication definitions.

Function Documentation

◆ GetRandomString()

std::string Dwm::Auth::GetRandomString ( size_t  sz)

Authenticate a client that has connected on the socket fd.

We will send them our public key from myKeys so that they can encrypt their response with it. They will send us their public key which we will use to encrypt our challenge. We will send an IV and a random string that is encrypted with the shared secret key symKey and an IV. They must decrypt the random string correctly and send the decrypted string back to us, encrypted with our public key. DEPRECATED. USE Dwm::Auth::PeerAuthenticator!!!! Authenticate to a server to which we've connected on socket fd. DEPRECATED. USE Dwm::Auth::PeerAuthenticator!!!! Returns a random string of length sz.