RTEMS 6.3
Loading...
Searching...
No Matches
md4.c File Reference

This source file contains the implemention of the MD4 hash algorithm. More...

#include <stdio.h>
#include "md4.h"
#include <inttypes.h>

Macros

#define I0   0x67452301L
#define I1   0xefcdab89L
#define I2   0x98badcfeL
#define I3   0x10325476L
#define C2   013240474631L
#define C3   015666365641L
#define fs1   3
#define fs2   7
#define fs3   11
#define fs4   19
#define gs1   3
#define gs2   5
#define gs3   9
#define gs4   13
#define hs1   3
#define hs2   9
#define hs3   11
#define hs4   15
#define f(X, Y, Z)
#define g(X, Y, Z)
#define h(X, Y, Z)
#define rot(X, S)
#define ff(A, B, C, D, i, s)
#define gg(A, B, C, D, i, s)
#define hh(A, B, C, D, i, s)

Functions

void MD4Print (MD4_CTX *MDp)
void MD4Init (MD4_CTX *MDp)
void MD4Update (MD4_CTX *MDp, unsigned char *X, unsigned int count)
void MD4Final (unsigned char *buf, MD4_CTX *MD)

Detailed Description

This source file contains the implemention of the MD4 hash algorithm.

Macro Definition Documentation

◆ f

#define f ( X,
Y,
Z )
Value:
((X&Y) | ((~X)&Z))

◆ ff

#define ff ( A,
B,
C,
D,
i,
s )
Value:
A = rot((A + f(B,C,D) + X[i]),s)

◆ g

#define g ( X,
Y,
Z )
Value:
((X&Y) | (X&Z) | (Y&Z))

◆ gg

#define gg ( A,
B,
C,
D,
i,
s )
Value:
A = rot((A + g(B,C,D) + X[i] + C2),s)

◆ h

#define h ( X,
Y,
Z )
Value:
(X^Y^Z)

◆ hh

#define hh ( A,
B,
C,
D,
i,
s )
Value:
A = rot((A + h(B,C,D) + X[i] + C3),s)

◆ rot

#define rot ( X,
S )
Value:
(tmp=X,(tmp<<S) | (tmp>>(32-S)))