10 #include <botan/hotp.h>
29 size_t digits = 6,
size_t time_step = 30) :
30 TOTP(key.begin(), key.size(),
hash_algo, digits, time_step) {}
39 TOTP(
const uint8_t key[],
size_t key_len,
42 size_t time_step = 30);
47 uint32_t generate_totp(std::chrono::system_clock::time_point time_point);
53 uint32_t generate_totp(uint64_t unix_time);
55 bool verify_totp(uint32_t otp,
56 std::chrono::system_clock::time_point time,
57 size_t clock_drift_accepted = 0);
59 bool verify_totp(uint32_t otp, uint64_t unix_time,
60 size_t clock_drift_accepted = 0);
65 std::chrono::system_clock::time_point m_unix_epoch;
TOTP(const SymmetricKey &key, const std::string &hash_algo="SHA-1", size_t digits=6, size_t time_step=30)
int(* final)(unsigned char *, CTX *)
#define BOTAN_PUBLIC_API(maj, min)
AlgorithmIdentifier hash_algo