diff options
Diffstat (limited to 'movement/lib/TOTP/TOTP.h')
-rw-r--r-- | movement/lib/TOTP/TOTP.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/movement/lib/TOTP/TOTP.h b/movement/lib/TOTP/TOTP.h new file mode 100644 index 00000000..4b5897eb --- /dev/null +++ b/movement/lib/TOTP/TOTP.h @@ -0,0 +1,21 @@ +#ifndef TOTP_H_
+#define TOTP_H_
+
+#include <inttypes.h>
+#include "time.h"
+
+typedef enum {
+ SHA1,
+ SHA224,
+ SHA256,
+ SHA384,
+ SHA512
+} hmac_alg;
+
+void TOTP(uint8_t* hmacKey, uint8_t keyLength, uint32_t timeStep, hmac_alg algorithm);
+void setTimezone(uint8_t timezone);
+uint32_t getCodeFromTimestamp(uint32_t timeStamp);
+uint32_t getCodeFromTimeStruct(struct tm time);
+uint32_t getCodeFromSteps(uint32_t steps);
+
+#endif // TOTP_H_
|