Encapsulate a challenge sent to a client or server to verify their idendity during authentication. More...
#include <DwmCredenceChallenge.hh>
Public Member Functions | |
| Challenge (bool init=false) | |
| Default constructor. | |
| Challenge (const Challenge &)=default | |
| Copy constructor. | |
| Challenge & | operator= (const Challenge &)=default |
| Assignment operator. | |
| operator const std::string & () const | |
| Returns a reference to the encapsulate challenge data. | |
| std::istream & | Read (std::istream &is) |
Reads the challenge from the given istream is. | |
| std::ostream & | Write (std::ostream &os) const |
Writes the challenge to the given ostream os. | |
Encapsulate a challenge sent to a client or server to verify their idendity during authentication.
The challenge consists of 32 bytes of random data.
| Dwm::Credence::Challenge::Challenge | ( | bool | init = false | ) |
Default constructor.
If init is true, the content of the challenge will be initialized with random data. This is used when the challenge will be transmitted. If init is false, the content of the challenge will not be initialized. This is used when we are intending to receive a challenge via the Read() member.
| std::istream & Dwm::Credence::Challenge::Read | ( | std::istream & | is | ) |
Reads the challenge from the given istream is.
Returns is. is normally a reference to an XChaChaPoly1305::Istream.
| std::ostream & Dwm::Credence::Challenge::Write | ( | std::ostream & | os | ) | const |
Writes the challenge to the given ostream os.
Returns os. os is normally a reference to an XChaChapoly1305::Ostream.