76 size_t digits = 6,
size_t time_step = 30) :
77 TOTP(key.begin(), key.size(),
hash_algo, digits, time_step) {}
86 TOTP(
const uint8_t key[],
size_t key_len,
89 size_t time_step = 30);
94 uint32_t generate_totp(std::chrono::system_clock::time_point time_point);
100 uint32_t generate_totp(uint64_t unix_time);
102 bool verify_totp(uint32_t otp,
103 std::chrono::system_clock::time_point time,
104 size_t clock_drift_accepted = 0);
106 bool verify_totp(uint32_t otp, uint64_t unix_time,
107 size_t clock_drift_accepted = 0);
112 std::chrono::system_clock::time_point m_unix_epoch;