Simple authentication definitions. More...
#include "DwmAuthSymCrypto.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. | |
Simple authentication definitions.
| 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.