libgslutil
1.2.3
|
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... | |
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.
struct gsl_md5* gsl_md5_start | ( | void | ) |
Create MD5 context.
Pass the context object to gsl_md5_update() to process data and free it with gsl_md5_finish() when done.
void gsl_md5_update | ( | struct gsl_md5 * | p, |
const void * | data, | ||
size_t | len | ||
) |
Process data with existing MD5 context.
p | MD5 context. |
data | Pointer to data bytes. |
len | Number of bytes of data to process. |
void gsl_md5_finish | ( | struct gsl_md5 * | p, |
uint8_t * | out | ||
) |
Complete MD5 processing, returning sum, and free context.
p | MD5 context. | |
[out] | out | Pointer 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.