Strophe: md5.c File Reference

Strophe 0.12 XMPP client library

Macros | Functions
md5.c File Reference

MD5 hash. More...

## Macros
#define | GET_32BIT_LSB_FIRST(cp)
#define | PUT_32BIT_LSB_FIRST(cp, value)
#define | F1(x, y, z) (z ^ (x & (y ^ z)))
#define | F2(x, y, z) F1(z, x, y)
#define | F3(x, y, z) (x ^ y ^ z)
#define | F4(x, y, z) (y ^ (x | ~z))
#define | MD5STEP(f, w, x, y, z, data, s) (w += f(x, y, z) + data, w = w << s | w >> (32 - s), w += x)

## Functions
static void | MD5Transform (uint32_t buf[4], const unsigned char inext[64])
void | MD5Init (struct MD5Context *ctx)
void | MD5Update (struct MD5Context *ctx, unsigned char const *buf, uint32_t len)
void | MD5Final (unsigned char digest[16], struct MD5Context *ctx)

## Detailed Description

MD5 hash.

## Macro Definition Documentation

## ◆ GET_32BIT_LSB_FIRST

#define GET_32BIT_LSB_FIRST | ( |  | cp | ) |

Value:
(((uint32_t)(unsigned char)(cp)[0]) | \
((uint32_t)(unsigned char)(cp)[1] << 8) | \
((uint32_t)(unsigned char)(cp)[2] << 16) | \
((uint32_t)(unsigned char)(cp)[3] << 24))

## ◆ PUT_32BIT_LSB_FIRST

#define PUT_32BIT_LSB_FIRST | ( |  | cp,
|  |  | value
| ) |  |

Value:
do { \
(cp)[0] = (value)&0xFF; \
(cp)[1] = ((value) >> 8) & 0xFF; \
(cp)[2] = ((value) >> 16) & 0xFF; \
(cp)[3] = ((value) >> 24) & 0xFF; \
} while (0)

## ◆ F1

#define F1 | ( |  | x,
|  |  | y,
|  |  | z
| ) |  | (z ^ (x & (y ^ z)))

## ◆ F2

#define F2 | ( |  | x,
|  |  | y,
|  |  | z
| ) |  | F1(z, x, y)

## ◆ F3

#define F3 | ( |  | x,
|  |  | y,
|  |  | z
| ) |  | (x ^ y ^ z)

## ◆ F4

#define F4 | ( |  | x,
|  |  | y,
|  |  | z
| ) |  | (y ^ (x | ~z))

## ◆ MD5STEP

#define MD5STEP | ( |  | f,
|  |  | w,
|  |  | x,
|  |  | y,
|  |  | z,
|  |  | data,
|  |  | s
| ) |  | (w += f(x, y, z) + data, w = w << s | w >> (32 - s), w += x)

## Function Documentation

## ◆ MD5Transform()

static void MD5Transform | ( | uint32_t | buf[4],
|  | const unsigned char | inext[64]
| ) |  |
| static

## ◆ MD5Init()

void MD5Init | ( | struct MD5Context * | ctx | ) |

## ◆ MD5Update()

void MD5Update | ( | struct MD5Context * | ctx,
|  | unsigned char const * | buf,
|  | uint32_t | len
| ) |  |

## ◆ MD5Final()

void MD5Final | ( | unsigned char | digest[16],
|  | struct MD5Context * | ctx
| ) |  |