ScalES-PPM
Loading...
Searching...
No Matches
md5.c File Reference

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"

Macros

#define PUT_64BIT_LE(cp, value)
 
#define PUT_32BIT_LE(cp, value)
 
#define F1(x, y, z)
 
#define F2(x, y, z)
 
#define F3(x, y, z)
 
#define F4(x, y, z)
 
#define MD5STEP(f, w, x, y, z, data, s)
 

Functions

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)
 

Detailed Description

Public-Domain MD5 implementation massaged for POSIX- and ScalES-PPM-conformance.

Version
1.0
Author
Thomas Jahns jahns.nosp@m.@dkr.nosp@m.z.de

Macro Definition Documentation

◆ F1

#define F1 ( x,
y,
z )
Value:
(z ^ (x & (y ^ z)))

◆ F2

#define F2 ( x,
y,
z )
Value:
F1(z, x, y)

◆ F3

#define F3 ( x,
y,
z )
Value:
(x ^ y ^ z)

◆ F4

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

◆ MD5STEP

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

◆ 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.