md5.h

MD5 interface definition.

MD5_DIGEST_LENGTH

Length of MD5 digests in byte.

1
(16U)
void md5_init(md5_ctx_t * ctx)

Initialize the MD5 calculation context.

Parameters

ctx:Pointer to the context to be initialized
The purpose of the context is to make it possible to generate an MD5 Message Digest in stages, rather than having to pass a single large block to a single MD5 function. The context structure keeps track of various bits of state information.

Once the context is initialized, the blocks of message data are passed to the <md5.h::md5_update()> function. Once the final bit of data has been handed to <md5.h::md5_update()> the context can be closed out by calling <md5.h::md5_final()>, which also calculates the final MD5 result. Don’t forget to free an allocated context structure when you’ve finished using it.

void md5_update(md5_ctx_t * ctx, const void * data, msp430_types.h::size_t len)

Build an MD5 Message Digest within the given context.

Parameters

ctx:Context of the current calculation
data:Input data
len:Length of data

void md5_final(md5_ctx_t * ctx, void * digest)

Finish up the current MD5 hash calculation generate the final hash.

Parameters

ctx:Context of the current calculation
digest:Result location, must be 16 byte

void md5(void * digest, const void * data, msp430_types.h::size_t len)

Calculate a MD5 hash from the given data.

Parameters

digest:Result location, must be 16 byte
data:Input data
len:Length of src

struct md5_ctx_t

MD5 calculation context.

uint32_t len

overall number of bytes processed

uint32_t abcd()

virtual registers for hash calculation

int b_used

number of bytes used in the current block

uint8_t block()

one block is calculated at a time