RTEMS 6.1-rc1
|
This source file contains the implemention of the MD4 hash algorithm. More...
Macros | |
#define | I0 0x67452301L /* Initial values for MD buffer */ |
#define | I1 0xefcdab89L |
#define | I2 0x98badcfeL |
#define | I3 0x10325476L |
#define | C2 013240474631L /* round 2 constant = sqrt(2) in octal */ |
#define | C3 015666365641L /* round 3 constant = sqrt(3) in octal */ |
#define | fs1 3 /* round 1 shift amounts */ |
#define | fs2 7 |
#define | fs3 11 |
#define | fs4 19 |
#define | gs1 3 /* round 2 shift amounts */ |
#define | gs2 5 |
#define | gs3 9 |
#define | gs4 13 |
#define | hs1 3 /* round 3 shift amounts */ |
#define | hs2 9 |
#define | hs3 11 |
#define | hs4 15 |
#define | f(X, Y, Z) ((X&Y) | ((~X)&Z)) |
#define | g(X, Y, Z) ((X&Y) | (X&Z) | (Y&Z)) |
#define | h(X, Y, Z) (X^Y^Z) |
#define | rot(X, S) (tmp=X,(tmp<<S) | (tmp>>(32-S))) |
#define | ff(A, B, C, D, i, s) A = rot((A + f(B,C,D) + X[i]),s) |
#define | gg(A, B, C, D, i, s) A = rot((A + g(B,C,D) + X[i] + C2),s) |
#define | hh(A, B, C, D, i, s) A = rot((A + h(B,C,D) + X[i] + C3),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) |
This source file contains the implemention of the MD4 hash algorithm.