libgslutil  1.2.3
Functions
MD5 implementation

Functions

struct gsl_md5 * gsl_md5_start (void)
 Create MD5 context. More...
 
void gsl_md5_update (struct gsl_md5 *p, const void *data, size_t len)
 Process data with existing MD5 context. More...
 
void gsl_md5_finish (struct gsl_md5 *p, uint8_t *out)
 Complete MD5 processing, returning sum, and free context. More...
 

Detailed Description

The standard MD5 hash based on RFC1321. Note that MD5 hashes are deprecated for security/cryptographic purposes; use SHA instead for new applications. This implementation is public domain with a very thin wrapper layer for libgslutil. It uses the opaque type struct gsl_md5 for a context object.

Function Documentation

◆ gsl_md5_start()

struct gsl_md5* gsl_md5_start ( void  )

Create MD5 context.

Returns
Pointer to newly-allocated context object.

Pass the context object to gsl_md5_update() to process data and free it with gsl_md5_finish() when done.

◆ gsl_md5_update()

void gsl_md5_update ( struct gsl_md5 *  p,
const void *  data,
size_t  len 
)

Process data with existing MD5 context.

Parameters
pMD5 context.
dataPointer to data bytes.
lenNumber of bytes of data to process.

◆ gsl_md5_finish()

void gsl_md5_finish ( struct gsl_md5 *  p,
uint8_t *  out 
)

Complete MD5 processing, returning sum, and free context.

Parameters
pMD5 context.
[out]outPointer to output buffer (at least 16 bytes). May be 0.

Writes the raw hash into out, if it was not null. Frees the MD5 context object p.