libre  0.5.0
Enumerations | Functions
re_md5.h File Reference

Interface to MD5 functions. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  { MD5_SIZE = 16, MD5_STR_SIZE = 2*MD5_SIZE + 1 }
 MD5 values. More...

Functions

void md5 (const uint8_t *d, size_t n, uint8_t *md)
 Calculate the MD5 hash from a buffer.
int md5_printf (uint8_t *md, const char *fmt,...)
 Calculate the MD5 hash from a formatted string.

Detailed Description

Interface to MD5 functions.

Copyright (C) 2010 Creytiv.com

Definition in file re_md5.h.

Enumeration Type Documentation

anonymous enum

MD5 values.

Enumerator:
MD5_SIZE 

Number of bytes in MD5 hash.

MD5_STR_SIZE 

Number of bytes in MD5 string.

Definition at line 9 of file re_md5.h.

Function Documentation

void md5 ( const uint8_t *  d,
size_t  n,
uint8_t *  md 
)

Calculate the MD5 hash from a buffer.

Parameters
dData buffer (input)
nNumber of input bytes
mdCalculated MD5 hash (output)

Definition at line 26 of file wrap.c.

Referenced by http_auth_print_challenge(), and md5_printf().

int md5_printf ( uint8_t *  md,
const char *  fmt,
  ... 
)

Calculate the MD5 hash from a formatted string.

Parameters
mdCalculated MD5 hash
fmtFormatted string
Returns
0 if success, otherwise errorcode

Definition at line 48 of file wrap.c.

References mbuf::buf, mbuf::end, mbuf_init(), mbuf_reset(), mbuf_vprintf(), and md5().

Referenced by httpauth_digest_response_auth().