Public-Domain MD5 implementation massaged for POSIX- and ScalES-PPM-conformance.
More...
#include <stdlib.h>
#include <string.h>
#include "core/ppm_visibility.h"
#include "crypto/md5.h"
|
#define | PUT_64BIT_LE(cp, value) |
|
#define | PUT_32BIT_LE(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 ) |
|
|
void | PPM_MD5Init (PPM_MD5_CTX *ctx) |
|
void | PPM_MD5Update (PPM_MD5_CTX *ctx, const uint8_t *input, size_t len) |
|
void | PPM_MD5Final (unsigned char digest[PPM_MD5_DIGEST_LENGTH], PPM_MD5_CTX *ctx) |
|
Public-Domain MD5 implementation massaged for POSIX- and ScalES-PPM-conformance.
- Copyright
- Copyright (C) 2012 Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de
- Version
- 1.0
- Author
- Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de
◆ PUT_32BIT_LE
#define PUT_32BIT_LE |
( |
| cp, |
|
|
| value ) |
Value: do { \
(cp)[3] = (value) >> 24; \
(cp)[2] = (value) >> 16; \
(cp)[1] = (value) >> 8; \
(cp)[0] = (value); } while (0)
◆ PUT_64BIT_LE
#define PUT_64BIT_LE |
( |
| cp, |
|
|
| value ) |
Value: do { \
(cp)[7] = (value) >> 56; \
(cp)[6] = (value) >> 48; \
(cp)[5] = (value) >> 40; \
(cp)[4] = (value) >> 32; \
(cp)[3] = (value) >> 24; \
(cp)[2] = (value) >> 16; \
(cp)[1] = (value) >> 8; \
(cp)[0] = (value); } while (0)
Das diesem Bericht zugrundeliegende Vorhaben wurde mit Mitteln des Bundesministeriums für Bildung, und Forschung unter dem Förderkennzeichen 01IH08004E gefördert. Die Verantwortung für den Inhalt dieser Veröffentlichung liegt beim Autor.