Local copy of the public domain SHA-1 library code by David Ireland.
More...
Macros
#define expand(W, i)
#define f1(x, y, z) ( z ^ ( x & ( y ^ z ) ) ) /* Rounds 0-19 */
#define f2(x, y, z) ( x ^ y ^ z ) /* Rounds 20-39 */
#define f3(x, y, z) ( ( x & y ) | ( z & ( x | y ) ) ) /* Rounds 40-59 */
#define f4(x, y, z) ( x ^ y ^ z ) /* Rounds 60-79 */
#define h0init 0x67452301UL
#define h1init 0xEFCDAB89UL
#define h2init 0x98BADCFEUL
#define h3init 0x10325476UL
#define h4init 0xC3D2E1F0UL
#define K1 0x5A827999UL /* Rounds 0-19 */
#define K2 0x6ED9EBA1UL /* Rounds 20-39 */
#define K3 0x8F1BBCDCUL /* Rounds 40-59 */
#define K4 0xCA62C1D6UL /* Rounds 60-79 */
#define ROTL(n, X) ( ( ( X ) << n ) | ( ( X ) >> ( 32 - n ) ) )
#define SHS_DATASIZE 64
#define SHS_DIGESTSIZE 20
#define subRound(a, b, c, d, e, f, k, data) ( e += ROTL( 5, a ) + f( b, c, d ) + k + data, b = ROTL( 30, b ) )
Functions
Calculate the hash of the data added to the context.
More...
Initialize a SHA-1 context so that data can be added to it.
More...
Add data to an initialized SHA-1 context.
More...
Detailed Description
Local copy of the public domain SHA-1 library code by David Ireland.
Macro Definition Documentation
Value:( W[ i & 15 ] = ROTL( 1, ( W[ i & 15 ] ^ W[ (i - 14) & 15 ] ^ \
W[ (i - 8) & 15 ] ^ W[ (i - 3) & 15 ] ) ) )