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

Go to the source code of this file.

Data Structures

union  _buffer
 
union  _state
 

Macros

#define HASH_LENGTH   20
 
#define BLOCK_LENGTH   64
 

Functions

void init (void)
 
void initHmac (const uint8_t *secret, uint8_t secretLength)
 
uint8_t * result (void)
 
uint8_t * resultHmac (void)
 
void write (uint8_t)
 
void writeArray (uint8_t *buffer, uint8_t size)
 

Variables

union _buffer buffer
 
union _state state
 
uint8_t bufferOffset
 
uint32_t byteCount
 
uint8_t keyBuffer [BLOCK_LENGTH]
 
uint8_t innerHash [HASH_LENGTH]
 

Macro Definition Documentation

◆ BLOCK_LENGTH

#define BLOCK_LENGTH   64

Definition at line 4 of file sha1.h.

◆ HASH_LENGTH

#define HASH_LENGTH   20

Definition at line 3 of file sha1.h.

Function Documentation

◆ init()

void init ( void )

Definition at line 17 of file sha1.c.

Here is the caller graph for this function:

◆ initHmac()

void initHmac ( const uint8_t * secret,
uint8_t secretLength )

Definition at line 127 of file sha1.c.

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

◆ result()

uint8_t * result ( void )

Definition at line 104 of file sha1.c.

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

◆ resultHmac()

uint8_t * resultHmac ( void )

Definition at line 146 of file sha1.c.

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

◆ write()

void write ( uint8_t data)

Definition at line 73 of file sha1.c.

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

◆ writeArray()

void writeArray ( uint8_t * buffer,
uint8_t size )

Definition at line 80 of file sha1.c.

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

Variable Documentation

◆ buffer

union _buffer buffer

◆ bufferOffset

uint8_t bufferOffset

Definition at line 15 of file sha1.h.

◆ byteCount

uint32_t byteCount

Definition at line 16 of file sha1.h.

◆ innerHash

uint8_t innerHash[HASH_LENGTH]

Definition at line 18 of file sha1.h.

◆ keyBuffer

uint8_t keyBuffer[BLOCK_LENGTH]

Definition at line 17 of file sha1.h.

◆ state

union _state state