OverSim
|
#include "SHA1.h"
Go to the source code of this file.
Macros | |
#define | _CRT_SECURE_NO_WARNINGS |
#define | SHA1_MAX_FILE_BUFFER (32 * 20 * 820) |
#define | ROL32(p_val32, p_nBits) (((p_val32)<<(p_nBits))|((p_val32)>>(32-(p_nBits)))) |
#define | SHABLK0(i) |
#define | SHABLK(i) |
#define | S_R0(v, w, x, y, z, i) {z+=((w&(x^y))^y)+SHABLK0(i)+0x5A827999+ROL32(v,5);w=ROL32(w,30);} |
#define | S_R1(v, w, x, y, z, i) {z+=((w&(x^y))^y)+SHABLK(i)+0x5A827999+ROL32(v,5);w=ROL32(w,30);} |
#define | S_R2(v, w, x, y, z, i) {z+=(w^x^y)+SHABLK(i)+0x6ED9EBA1+ROL32(v,5);w=ROL32(w,30);} |
#define | S_R3(v, w, x, y, z, i) {z+=(((w|x)&y)|(w&x))+SHABLK(i)+0x8F1BBCDC+ROL32(v,5);w=ROL32(w,30);} |
#define | S_R4(v, w, x, y, z, i) {z+=(w^x^y)+SHABLK(i)+0xCA62C1D6+ROL32(v,5);w=ROL32(w,30);} |
#define ROL32 | ( | p_val32, | |
p_nBits | |||
) | (((p_val32)<<(p_nBits))|((p_val32)>>(32-(p_nBits)))) |
#define S_R0 | ( | v, | |
w, | |||
x, | |||
y, | |||
z, | |||
i | |||
) | {z+=((w&(x^y))^y)+SHABLK0(i)+0x5A827999+ROL32(v,5);w=ROL32(w,30);} |
Definition at line 36 of file SHA1.cc.
Referenced by CSHA1::Transform().
#define S_R1 | ( | v, | |
w, | |||
x, | |||
y, | |||
z, | |||
i | |||
) | {z+=((w&(x^y))^y)+SHABLK(i)+0x5A827999+ROL32(v,5);w=ROL32(w,30);} |
Definition at line 37 of file SHA1.cc.
Referenced by CSHA1::Transform().
#define S_R2 | ( | v, | |
w, | |||
x, | |||
y, | |||
z, | |||
i | |||
) | {z+=(w^x^y)+SHABLK(i)+0x6ED9EBA1+ROL32(v,5);w=ROL32(w,30);} |
Definition at line 38 of file SHA1.cc.
Referenced by CSHA1::Transform().
#define S_R3 | ( | v, | |
w, | |||
x, | |||
y, | |||
z, | |||
i | |||
) | {z+=(((w|x)&y)|(w&x))+SHABLK(i)+0x8F1BBCDC+ROL32(v,5);w=ROL32(w,30);} |
Definition at line 39 of file SHA1.cc.
Referenced by CSHA1::Transform().
#define S_R4 | ( | v, | |
w, | |||
x, | |||
y, | |||
z, | |||
i | |||
) | {z+=(w^x^y)+SHABLK(i)+0xCA62C1D6+ROL32(v,5);w=ROL32(w,30);} |
Definition at line 40 of file SHA1.cc.
Referenced by CSHA1::Transform().
#define SHA1_MAX_FILE_BUFFER (32 * 20 * 820) |
Definition at line 14 of file SHA1.cc.
Referenced by CSHA1::HashFile().
#define SHABLK | ( | i | ) |