EVE 1.0
Collaboration diagram for SHA1:

Functions

void sha1_init (struct sha1_state_t *state)
 
void sha1_calc (struct sha1_state_t *state, const void *src, int bytelength)
 
void sha1_commit (struct sha1_state_t *state, unsigned char *hash)
 
void sha1_toHexString (const unsigned char *hash, char *hexstring)
 

Detailed Description

Function Documentation

void sha1_init ( struct sha1_state_t *  state)
Parameters
statethe SHA-1 hasher instance
void sha1_calc ( struct sha1_state_t *  state,
const void *  src,
int  bytelength 
)
Parameters
statethe SHA-1 hasher instance
srcpoints to any kind of data to be hashed.
bytelengththe number of bytes to hash from the src pointer.
void sha1_commit ( struct sha1_state_t *  state,
unsigned char *  hash 
)
Parameters
statethe SHA-1 hasher instance
hashshould point to a buffer of at least 20 bytes of size for storing the sha1 result in.
void sha1_toHexString ( const unsigned char *  hash,
char *  hexstring 
)
Parameters
hashis 20 bytes of sha1 hash. This is the same data that is the result from the calc function.
hexstringshould point to a buffer of at least 41 bytes of size for storing the hexadecimal representation of the hash. A zero will be written at position 40, so the buffer will be a valid zero ended string.