libfossil
fsl_md5_cx Struct Reference

Holds state for MD5 calculations. More...

#include "hash.h"

Collaboration diagram for fsl_md5_cx:

Data Fields

uint32_t bits [2]
uint32_t buf [4]
unsigned char in [64]
int isInit

Detailed Description

Holds state for MD5 calculations.

It is intended to be used like this:

unsigned char digest[FSL_STRLEN_MD5/2];
char hex[FSL_STRLEN_MD5+1];
// alternately: fsl_md5_init(&cx);
...call fsl_md5_update(&cx,...) any number of times to
...incrementally calculate the hash.
fsl_md5_final(&cx, digest); // ends the calculation
// digest now contains the raw 16-byte MD5 digest.
// hex now contains the 32-byte MD5 + a trailing NUL
FSL_EXPORT const fsl_md5_cx fsl_md5_cx_empty
Equivalent to fsl_md5_cx_empty_m but suitable for non-const copy initialization.
Definition hash.h:123
FSL_EXPORT void fsl_md5_digest_to_base16(unsigned char const *digest, char *zBuf)
Converts an md5 digest value (from fsl_md5_final()'s 2nd parameter) to a 32-byte (FSL_STRLEN_MD5) CRC...
FSL_EXPORT void fsl_md5_final(fsl_md5_cx *cx, unsigned char *digest)
Finishes up the calculation of the md5 for the given context and writes a 16-byte digest value to the...
FSL_EXPORT void fsl_md5_update(fsl_md5_cx *cx, void const *buf, fsl_size_t len)
Updates cx's state to reflect the addition of the data specified by the range (buf,...
@ FSL_STRLEN_MD5
The length, in bytes, of a hex-format MD5 hash string.
Definition hash.h:41
Holds state for MD5 calculations.
Definition hash.h:97

Definition at line 97 of file hash.h.

Field Documentation

◆ bits

uint32_t fsl_md5_cx::bits[2]

Definition at line 100 of file hash.h.

◆ buf

uint32_t fsl_md5_cx::buf[4]

Definition at line 99 of file hash.h.

◆ in

unsigned char fsl_md5_cx::in[64]

Definition at line 101 of file hash.h.

◆ isInit

int fsl_md5_cx::isInit

Definition at line 98 of file hash.h.


The documentation for this struct was generated from the following file: