9#include <botan/tls_psk_identity_13.h>
11#include <botan/internal/stl_util.h>
17uint32_t obfuscate_ticket_age(
const uint64_t in,
const uint64_t ticket_age_add) {
23 return static_cast<uint32_t
>(in + ticket_age_add);
29 const std::chrono::milliseconds age,
30 const uint32_t ticket_age_add) :
31 PskIdentity(std::move(identity.get()), obfuscate_ticket_age(age.count(), ticket_age_add)) {}
39 m_obfuscated_age(0) {}
42 return std::chrono::milliseconds(obfuscate_ticket_age(m_obfuscated_age, ticket_age_add));
std::chrono::milliseconds age(uint32_t ticket_age_add) const
PskIdentity(std::vector< uint8_t > identity, const uint32_t obfuscated_age)
std::string identity_as_string() const
T to_byte_vector(std::string_view s)
std::string to_string(ErrorType type)
Convert an ErrorType to string.