Botan 2.13.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
Botan::Roughtime::Nonce Class Referencefinal

`#include <roughtime.h>`

## Public Member Functions
const std::array< uint8_t, 64 > & | get_nonce () const
| Nonce ()=default
| Nonce (const std::vector< uint8_t > &nonce)
| Nonce (RandomNumberGenerator &rng)
| Nonce (const std::array< uint8_t, 64 > &nonce)
bool | operator== (const Nonce &rhs) const

## Detailed Description

Definition at line 32 of file roughtime.h.

## Constructor & Destructor Documentation

Botan::Roughtime::Nonce::Nonce | ( |  | ) |
| default

Botan::Roughtime::Nonce::Nonce | ( | const std::vector< uint8_t > & | nonce | ) |

Definition at line 158 of file roughtime.cpp.

159 {
160 if(nonce.size() != 64)
161 { throw Invalid_Argument("Nonce lenght must be 64"); }
162 m_nonce = typecast_copy<std::array<uint8_t, 64>>(nonce.data());
163 }

Botan::Roughtime::Nonce::Nonce | ( | RandomNumberGenerator & | rng | ) |

Definition at line 164 of file roughtime.cpp.

References Botan::RandomNumberGenerator::randomize().

165 {
166 rng.randomize(m_nonce.data(), m_nonce.size());
167 }

Botan::Roughtime::Nonce::Nonce | ( | const std::array< uint8_t, 64 > & | nonce | ) |
| inline

Definition at line 38 of file roughtime.h.

39 {
40 m_nonce = nonce;
41 }

## Member Function Documentation

const std::array<uint8_t, 64>& Botan::Roughtime::Nonce::get_nonce | ( |  | ) | const
| inline

Definition at line 43 of file roughtime.h.

Referenced by Botan::Roughtime::encode_request(), Botan::Roughtime::Response::from_bits(), and Botan::Roughtime::nonce_from_blind().

43 { return m_nonce; }

bool Botan::Roughtime::Nonce::operator== | ( | const Nonce & | rhs | ) | const
| inline

Definition at line 42 of file roughtime.h.

42 { return m_nonce == rhs.m_nonce; }

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

- src/lib/misc/roughtime/roughtime.h
- src/lib/misc/roughtime/roughtime.cpp