sha1c.c File Reference


Detailed Description

Local copy of the public domain SHA-1 library code by David Ireland.

#include "tsk_base_i.h"

Defines

#define SHS_DATASIZE   64
#define SHS_DIGESTSIZE   20
#define f1(x, y, z)   ( z ^ ( x & ( y ^ z ) ) )
#define f2(x, y, z)   ( x ^ y ^ z )
#define f3(x, y, z)   ( ( x & y ) | ( z & ( x | y ) ) )
#define f4(x, y, z)   ( x ^ y ^ z )
#define K1   0x5A827999UL
#define K2   0x6ED9EBA1UL
#define K3   0x8F1BBCDCUL
#define K4   0xCA62C1D6UL
#define h0init   0x67452301UL
#define h1init   0xEFCDAB89UL
#define h2init   0x98BADCFEUL
#define h3init   0x10325476UL
#define h4init   0xC3D2E1F0UL
#define ROTL(n, X)   ( ( ( X ) << n ) | ( ( X ) >> ( 32 - n ) ) )
#define expand(W, i)
#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

void endianTest (int *endian_ness)
void TSK_SHA_Init (TSK_SHA_CTX *shsInfo)
void TSK_SHA_Update (TSK_SHA_CTX *shsInfo, BYTE *buffer, int count)
void TSK_SHA_Final (BYTE *output, TSK_SHA_CTX *shsInfo)


Define Documentation

#define expand ( W,
 ) 

Value:

( W[ i & 15 ] = ROTL( 1, ( W[ i & 15 ] ^ W[ (i - 14) & 15 ] ^ \
                                                 W[ (i - 8) & 15 ] ^ W[ (i - 3) & 15 ] ) ) )


Generated on Tue Jan 29 00:26:13 2008 for The Sleuth Kit (Incomplete Docs) by  doxygen 1.5.1