libDwmCredence-0.1.32
Dwm::Credence::Challenge Class Reference

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.
 
Challengeoperator= (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.
 

Detailed Description

Encapsulate a challenge sent to a client or server to verify their idendity during authentication.

The challenge consists of 32 bytes of random data.

Constructor & Destructor Documentation

◆ Challenge()

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.

Member Function Documentation

◆ Read()

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.

◆ Write()

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.


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