Tilde Friends
Loading...
Searching...
No Matches
SHA1

Classes

struct  SHA1Context
 

Typedefs

typedef struct SHA1Context SHA1_CTX
 

Functions

void SHA1Init (struct SHA1Context *context)
 
void SHA1Update (struct SHA1Context *context, const void *data, uint32_t len)
 
void SHA1Final (unsigned char digest[20], struct SHA1Context *context)
 
void SHA1Transform (uint32_t state[5], const unsigned char buffer[64])
 

Detailed Description

SHA1 API. Adapted from https://web.mit.edu/freebsd/head/contrib/wpa/src/crypto/sha1_i.h by Cory McWilliams 2025-09-28.

Typedef Documentation

◆ SHA1_CTX

typedef struct SHA1Context SHA1_CTX

SHA1 context.

Function Documentation

◆ SHA1Final()

void SHA1Final ( unsigned char  digest[20],
struct SHA1Context context 
)

Calculate the final hash digest.

Parameters
digestPopulated with the digest.
contextThe SHA1 context.

◆ SHA1Init()

void SHA1Init ( struct SHA1Context context)

Initialize a SHA1 context.

Parameters
contextThe context.

◆ SHA1Transform()

void SHA1Transform ( uint32_t  state[5],
const unsigned char  buffer[64] 
)

Perform a SHA1 transformation.

Parameters
stateThe SHA1 state.
bufferThe data.

◆ SHA1Update()

void SHA1Update ( struct SHA1Context context,
const void *  data,
uint32_t  len 
)

Calculate an ongoing hash for a block of data.

Parameters
contextThe SHA1 context.
dataThe data to hash.
lenThe length of data.