SLikeNet 0.1.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros
DR_SHA1.cpp File Reference
`#include "slikenet/DR_SHA1.h"`
`#include <stdlib.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) (m_block->l[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);}

## Macro Definition Documentation

#define _CRT_SECURE_NO_WARNINGS

Definition at line 19 of file DR_SHA1.cpp.

#define ROL32 | ( |  | p_val32,
|  |  | p_nBits
| ) |  | (((p_val32)<<(p_nBits))|((p_val32)>>(32-(p_nBits))))

Definition at line 30 of file DR_SHA1.cpp.

#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 45 of file DR_SHA1.cpp.

#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 46 of file DR_SHA1.cpp.

#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 47 of file DR_SHA1.cpp.

#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 48 of file DR_SHA1.cpp.

#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 49 of file DR_SHA1.cpp.

#define SHA1_MAX_FILE_BUFFER (32 * 20 * 820)

Definition at line 23 of file DR_SHA1.cpp.

#define SHABLK | ( |  | i | ) |

Value:
(m_block->l[i&15] = ROL32(m_block->l[(i+13)&15] ^ \
m_block->l[(i+8)&15] ^ m_block->l[(i+2)&15] ^ m_block->l[i&15],1))

Definition at line 41 of file DR_SHA1.cpp.

#define SHABLK0 | ( |  | i | ) | (m_block->l[i])

Definition at line 38 of file DR_SHA1.cpp.