sha1.cpp File Reference

Secure Hash Algorithm 1 (SHA-1). More...

#include "sha1.hpp"
#include <iomanip>
#include <sstream>

Include dependency graph for sha1.cpp:

Go to the source code of this file.

Defines

#define sha_rotl(n, x)   ( ((x) << (n)) | ((x) >> (32-(n))) )
#define sha_ch(x, y, z)   ( ((x) & (y)) | ((!(x)) & (z)) )
#define sha_parity(x, y, z)   ( (x) ^ (y) ^ (z) )
#define sha_maj(x, y, z)   ( ((x) & (y)) | ((x) & (z)) | ((y) & (z)) )


Detailed Description

Secure Hash Algorithm 1 (SHA-1).

Used to checksum the game-config / cache.

Definition in file sha1.cpp.


Define Documentation

#define sha_ch ( x,
y,
 )     ( ((x) & (y)) | ((!(x)) & (z)) )

Definition at line 34 of file sha1.cpp.

Referenced by sha1_hash::next().

#define sha_maj ( x,
y,
 )     ( ((x) & (y)) | ((x) & (z)) | ((y) & (z)) )

Definition at line 36 of file sha1.cpp.

Referenced by sha1_hash::next().

#define sha_parity ( x,
y,
 )     ( (x) ^ (y) ^ (z) )

Definition at line 35 of file sha1.cpp.

Referenced by sha1_hash::next().

#define sha_rotl ( n,
 )     ( ((x) << (n)) | ((x) >> (32-(n))) )

Definition at line 33 of file sha1.cpp.

Referenced by sha1_hash::next().


Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs