All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
md5.h File Reference

Structures and prototypes for md5. More...

#include <string.h>
+ Include dependency graph for md5.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  FR_MD5Context
 

Macros

#define fr_md5_copy(_out, _in)   memcpy(_out, _in, sizeof(*_out))
 
#define MD5_BLOCK_LENGTH   64
 
#define MD5_DIGEST_LENGTH   16
 

Typedefs

typedef struct FR_MD5Context FR_MD5_CTX
 

Functions

void fr_hmac_md5 (uint8_t digest[MD5_DIGEST_LENGTH], uint8_t const *text, size_t text_len, uint8_t const *key, size_t key_len) CC_BOUNDED(__minbytes__
 
void fr_md5_calc (uint8_t *out, uint8_t const *in, size_t inlen)
 Calculate the MD5 hash of the contents of a buffer. More...
 
void void fr_md5_final (uint8_t out[MD5_DIGEST_LENGTH], FR_MD5_CTX *ctx) CC_BOUNDED(__minbytes__
 
void fr_md5_init (FR_MD5_CTX *ctx)
 Initialise a new MD5 context. More...
 
void fr_md5_transform (uint32_t state[4], uint8_t const block[MD5_BLOCK_LENGTH]) CC_BOUNDED(__minbytes__
 
void fr_md5_update (FR_MD5_CTX *ctx, uint8_t const *in, size_t inlen) CC_BOUNDED(__string__
 

Variables

void MD5_BLOCK_LENGTH
 
void void MD5_DIGEST_LENGTH
 

Detailed Description

Structures and prototypes for md5.

Id:
268196dc6a0b39afbbaf10d03fb174c370bccba9
Note
license is LGPL, but largely derived from a public domain source.

Definition in file md5.h.


Data Structure Documentation

struct FR_MD5Context

Definition at line 55 of file md5.h.

Data Fields
uint8_t buffer[MD5_BLOCK_LENGTH] Input buffer.
uint32_t count[2] Number of bits, mod 2^64.
uint32_t state[4] State.

Macro Definition Documentation

#define fr_md5_copy (   _out,
  _in 
)    memcpy(_out, _in, sizeof(*_out))

Definition at line 69 of file md5.h.

#define MD5_BLOCK_LENGTH   64

Definition at line 54 of file md5.h.

void MD5_DIGEST_LENGTH   16

Definition at line 36 of file md5.h.

Typedef Documentation

typedef struct FR_MD5Context FR_MD5_CTX

Function Documentation

void fr_hmac_md5 ( uint8_t  digest[MD5_DIGEST_LENGTH],
uint8_t const *  text,
size_t  text_len,
uint8_t const *  key,
size_t  key_len 
)

+ Here is the caller graph for this function:

void fr_md5_calc ( uint8_t *  out,
uint8_t const *  in,
size_t  inlen 
)

Calculate the MD5 hash of the contents of a buffer.

Parameters
[out]outWhere to write the MD5 digest. Must be a minimum of MD5_DIGEST_LENGTH.
[in]inData to hash.
[in]inlenLength of the data.

Definition at line 28 of file md5.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void void fr_md5_final ( uint8_t  out[MD5_DIGEST_LENGTH],
FR_MD5_CTX ctx 
)

+ Here is the caller graph for this function:

void fr_md5_init ( FR_MD5_CTX ctx)

Initialise a new MD5 context.

Set bit count to 0 and buffer to mysterious initialization constants.

Parameters
[out]ctxto initialise.

Definition at line 84 of file md5.c.

+ Here is the caller graph for this function:

void fr_md5_transform ( uint32_t  state[4],
uint8_t const  block[MD5_BLOCK_LENGTH] 
)
void fr_md5_update ( FR_MD5_CTX ctx,
uint8_t const *  in,
size_t  inlen 
)

+ Here is the caller graph for this function:

Variable Documentation

void MD5_BLOCK_LENGTH

Definition at line 68 of file md5.h.

void MD5_DIGEST_LENGTH

Definition at line 65 of file md5.h.