Encapsulates a challenge response. More...
#include <DwmCredenceChallengeResponse.hh>
Public Member Functions | |
| ChallengeResponse ()=default | |
| Default constructor. | |
| ChallengeResponse (const ChallengeResponse &)=default | |
| Default copy constructor. | |
| bool | Create (const std::string &signingKey, const Challenge &challenge) |
Given a challenge, creates the response using the given signingKey. | |
| std::istream & | Read (std::istream &is) |
Reads the challenge response from the given istream is. | |
| std::ostream & | Write (std::ostream &os) const |
Writes the challenge response to the given ostream os. | |
| bool | Verify (const std::string &publicKey, const std::string &challengeString) const |
Using the given publicKey of the source of the response, verifies that the response was signed by the source and that the response contents matches the given challengeString. | |
Encapsulates a challenge response.
This is used when responding to a Challenge during authentication to a client or server.
| bool Dwm::Credence::ChallengeResponse::Create | ( | const std::string & | signingKey, |
| const Challenge & | challenge ) |
Given a challenge, creates the response using the given signingKey.
Returns true on success, false on failure.
| std::istream & Dwm::Credence::ChallengeResponse::Read | ( | std::istream & | is | ) |
Reads the challenge response from the given istream is.
Returns is. is is normally a reference to an XChaCha20Poly1305::Istream (an encrypted stream).
| bool Dwm::Credence::ChallengeResponse::Verify | ( | const std::string & | publicKey, |
| const std::string & | challengeString ) const |
Using the given publicKey of the source of the response, verifies that the response was signed by the source and that the response contents matches the given challengeString.
Returns true if the response is correct, else returns false.
| std::ostream & Dwm::Credence::ChallengeResponse::Write | ( | std::ostream & | os | ) | const |
Writes the challenge response to the given ostream os.
Returns os. os is normally a reference to an XChaCha20Poly1305::Ostream (an encrypted stream).