SWE-350 TOTP Generator Milestone 5
The DE-10 board has six 7-segment displays, this can be used to display and generate a time based one-time pin (TOTP).
Loading...
Searching...
No Matches
TOTP.h
Go to the documentation of this file.
1#include <inttypes.h>
2#include "time.h"
3
8void TOTP(uint8_t* hmacKey, uint8_t keyLength, uint32_t timeStep);
12void setTimezone(uint8_t timezone);
16uint32_t getCodeFromTimestamp(uint32_t timeStamp);
21uint32_t getCodeFromTimeStruct(struct tm time);
27uint32_t getCodeFromSteps(uint32_t steps);
void TOTP(uint8_t *hmacKey, uint8_t keyLength, uint32_t timeStep)
TOTP Object, main object for the code generator.
Definition TOTP.c:10
uint32_t getCodeFromSteps(uint32_t steps)
Accepts a number of steps for a HMAC based code, not used for this project From the TOTP library.
Definition TOTP.c:40
uint32_t getCodeFromTimestamp(uint32_t timeStamp)
Accepts a timestamp from uint32_t, returns the code in uint32_t.
Definition TOTP.c:29
uint32_t getCodeFromTimeStruct(struct tm time)
Accepts a timestamp from struct tm, returns the code in uint32_t, not used for the current project Fr...
Definition TOTP.c:35
void setTimezone(uint8_t timezone)
Set the timezone from UTC, Arizona is always -7, so this is what is hard encoded into main.
Definition TOTP.c:16