|
Botan 3.13.0
Crypto and TLS for C&
|
#include <roughtime.h>
Public Types | |
| using | microseconds32 = std::chrono::duration<uint32_t, std::micro> |
| using | microseconds64 = std::chrono::duration<uint64_t, std::micro> |
| using | sys_microseconds64 = std::chrono::time_point<std::chrono::system_clock, microseconds64> |
Public Member Functions | |
| sys_microseconds64 | utc_midpoint () const |
| microseconds32 | utc_radius () const |
| bool | validate (const Ed25519_PublicKey &pk) const |
Static Public Member Functions | |
| static Response | from_bits (const std::vector< uint8_t > &response, const Nonce &nonce) |
An Roughtime response.
Definition at line 103 of file roughtime.h.
| using Botan::Roughtime::Response::microseconds32 = std::chrono::duration<uint32_t, std::micro> |
A 32 bit microsecond duration
Definition at line 108 of file roughtime.h.
| using Botan::Roughtime::Response::microseconds64 = std::chrono::duration<uint64_t, std::micro> |
A 64 bit microsecond duration
Definition at line 113 of file roughtime.h.
| using Botan::Roughtime::Response::sys_microseconds64 = std::chrono::time_point<std::chrono::system_clock, microseconds64> |
A system clock time point with microsecond resolution
Definition at line 118 of file roughtime.h.
|
static |
Parse a Roughtime response
| response | the raw response bytes |
| nonce | the nonce which was sent in the request |
Definition at line 181 of file roughtime.cpp.
References Botan::Roughtime::Nonce::get_nonce(), Botan::BufferSlicer::take(), and Botan::verify_signature().
Referenced by Botan::Roughtime::Chain::responses().
|
inline |
Return the midpoint of the time interval reported by the server
Definition at line 139 of file roughtime.h.
|
inline |
Return the radius of the time interval reported by the server
Definition at line 145 of file roughtime.h.
| bool Botan::Roughtime::Response::validate | ( | const Ed25519_PublicKey & | pk | ) | const |
Check the signatures on this response
| pk | the long term public key of the server |
Definition at line 234 of file roughtime.cpp.
References Botan::PK_Verifier::check_signature(), and Botan::PK_Verifier::update().