Galena :: xfirelib

This is a static archive of the original page - xfirelib is no longer maintained.
Navigation
Home
Board
Bug Tracker
Downloads

XFireGateway





User

You are currently not logged in.
Login
Register


0 logged in users.
21 active guests.


Project: xfirelib

Home
Board

SHA1.cpp File Reference

#include "SHA1.h"

Include dependency graph for SHA1.cpp:

Go to the source code of this file.

Defines

#define SHA1_MAX_FILE_BUFFER   8000
#define ROL32(_val32, _nBits)   (((_val32)<<(_nBits))|((_val32)>>(32-(_nBits))))
#define SHABLK0(i)
#define SHABLK(i)
#define _R0(v, w, x, y, z, i)   { z+=((w&(x^y))^y)+SHABLK0(i)+0x5A827999+ROL32(v,5); w=ROL32(w,30); }
#define _R1(v, w, x, y, z, i)   { z+=((w&(x^y))^y)+SHABLK(i)+0x5A827999+ROL32(v,5); w=ROL32(w,30); }
#define _R2(v, w, x, y, z, i)   { z+=(w^x^y)+SHABLK(i)+0x6ED9EBA1+ROL32(v,5); w=ROL32(w,30); }
#define _R3(v, w, x, y, z, i)   { z+=(((w|x)&y)|(w&x))+SHABLK(i)+0x8F1BBCDC+ROL32(v,5); w=ROL32(w,30); }
#define _R4(v, w, x, y, z, i)   { z+=(w^x^y)+SHABLK(i)+0xCA62C1D6+ROL32(v,5); w=ROL32(w,30); }


Define Documentation

#define _R0 v,
w,
x,
y,
z,
 )     { z+=((w&(x^y))^y)+SHABLK0(i)+0x5A827999+ROL32(v,5); w=ROL32(w,30); }
 

Definition at line 47 of file SHA1.cpp.

#define _R1 v,
w,
x,
y,
z,
 )     { z+=((w&(x^y))^y)+SHABLK(i)+0x5A827999+ROL32(v,5); w=ROL32(w,30); }
 

Definition at line 48 of file SHA1.cpp.

#define _R2 v,
w,
x,
y,
z,
 )     { z+=(w^x^y)+SHABLK(i)+0x6ED9EBA1+ROL32(v,5); w=ROL32(w,30); }
 

Definition at line 49 of file SHA1.cpp.

#define _R3 v,
w,
x,
y,
z,
 )     { z+=(((w|x)&y)|(w&x))+SHABLK(i)+0x8F1BBCDC+ROL32(v,5); w=ROL32(w,30); }
 

Definition at line 50 of file SHA1.cpp.

#define _R4 v,
w,
x,
y,
z,
 )     { z+=(w^x^y)+SHABLK(i)+0xCA62C1D6+ROL32(v,5); w=ROL32(w,30); }
 

Definition at line 51 of file SHA1.cpp.

#define ROL32 _val32,
_nBits   )     (((_val32)<<(_nBits))|((_val32)>>(32-(_nBits))))
 

Definition at line 32 of file SHA1.cpp.

#define SHA1_MAX_FILE_BUFFER   8000
 

Definition at line 25 of file SHA1.cpp.

Referenced by CSHA1::HashFile().

#define SHABLK  ) 
 

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 43 of file SHA1.cpp.

#define SHABLK0  ) 
 

Value:

(m_block->l[i] = \
        (ROL32(m_block->l[i],24) & 0xFF00FF00) | (ROL32(m_block->l[i],8) & 0x00FF00FF))

Definition at line 37 of file SHA1.cpp.


Powered by Galena
This page is powered by Galena. - Get your own free "CMS" (Wiki, Board, Todolist/Buglist-Tracker)
Author of Galena: Herbert Poul - kahless+galena@sphene.net - jabber id: kahless@sphene.net - icq uin: 50647169
Page generated in 17 millisecs