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 File Reference
#include <inttypes.h>
#include "time.h"
Include dependency graph for TOTP.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void TOTP (uint8_t *hmacKey, uint8_t keyLength, uint32_t timeStep)
 TOTP Object, main object for the code generator.
 
void setTimezone (uint8_t timezone)
 Set the timezone from UTC, Arizona is always -7, so this is what is hard encoded into main.
 
uint32_t getCodeFromTimestamp (uint32_t timeStamp)
 Accepts a timestamp from uint32_t, returns the code in uint32_t.
 
uint32_t getCodeFromTimeStruct (struct tm time)
 Accepts a timestamp from struct tm, returns the code in uint32_t, not used for the current project From the TOTP library.
 
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.
 

Function Documentation

◆ getCodeFromSteps()

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 at line 40 of file TOTP.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCodeFromTimestamp()

uint32_t getCodeFromTimestamp ( uint32_t timeStamp)

Accepts a timestamp from uint32_t, returns the code in uint32_t.

Definition at line 29 of file TOTP.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCodeFromTimeStruct()

uint32_t getCodeFromTimeStruct ( struct tm time)

Accepts a timestamp from struct tm, returns the code in uint32_t, not used for the current project From the TOTP library.

Definition at line 35 of file TOTP.c.

Here is the call graph for this function:

◆ setTimezone()

void setTimezone ( uint8_t timezone)

Set the timezone from UTC, Arizona is always -7, so this is what is hard encoded into main.

Definition at line 16 of file TOTP.c.

Here is the caller graph for this function:

◆ TOTP()

void TOTP ( uint8_t * hmacKey,
uint8_t keyLength,
uint32_t timeStep )

TOTP Object, main object for the code generator.

Definition at line 10 of file TOTP.c.

Here is the caller graph for this function: