The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Macros
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.

Macros

#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.

Macro Definition Documentation

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

Definition at line 36 of file sha1.cpp.

Referenced by sha1_hash::next().

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

Definition at line 38 of file sha1.cpp.

Referenced by sha1_hash::next().

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

Definition at line 37 of file sha1.cpp.

Referenced by sha1_hash::next().

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

Definition at line 35 of file sha1.cpp.

Referenced by sha1_hash::next().