COOPY » Guide  version 0.6.5
Defines | Typedefs | Functions | Variables
/home/paulfitz/cvs/coopy_scm/coopy/src/libcoopy_core/Sha1Generator.cpp File Reference
#include <stdint.h>
#include <sys/types.h>
#include <coopy/Sha1Generator.h>
#include <string.h>

Go to the source code of this file.

Defines

#define SHA1HashSize   20
#define shaSuccess   0
#define shaInputTooLong   1
#define shaStateError   2
#define SHA1CircularShift(bits, word)   (((word) << (bits)) | ((word) >> (32-(bits))))

Typedefs

typedef struct SHA1Context SHA1Context

Functions

static void SHA1PadMessage (SHA1Context *)
static void SHA1ProcessMessageBlock (SHA1Context *)
static int SHA1Reset (SHA1Context *context)
static int SHA1Result (SHA1Context *context, uint8_t Message_Digest[SHA1HashSize])
static int SHA1Input (SHA1Context *context, const uint8_t *message_array, unsigned length)
static void DigestToBase16 (unsigned char *digest, char *zBuf)
void sha1sum_step_text (const char *zText, int nBytes)
char * sha1sum_finish ()

Variables

static SHA1Context incrCtx
static int incrInit = 0
static int hashLen = 0

Define Documentation

#define SHA1CircularShift (   bits,
  word 
)    (((word) << (bits)) | ((word) >> (32-(bits))))

Definition at line 81 of file Sha1Generator.cpp.

Referenced by SHA1ProcessMessageBlock().

#define SHA1HashSize   20

Definition at line 24 of file Sha1Generator.cpp.

Referenced by SHA1Result().

#define shaInputTooLong   1

Definition at line 26 of file Sha1Generator.cpp.

#define shaStateError   2

Definition at line 27 of file Sha1Generator.cpp.

Referenced by SHA1Input().

#define shaSuccess   0

Definition at line 25 of file Sha1Generator.cpp.

Referenced by SHA1Input(), SHA1Reset(), and SHA1Result().


Typedef Documentation

typedef struct SHA1Context SHA1Context

Definition at line 33 of file Sha1Generator.cpp.


Function Documentation

static void DigestToBase16 ( unsigned char *  digest,
char *  zBuf 
) [static]

Definition at line 426 of file Sha1Generator.cpp.

Referenced by sha1sum_finish().

static int SHA1Input ( SHA1Context context,
const uint8_t *  message_array,
unsigned  length 
) [static]

Definition at line 194 of file Sha1Generator.cpp.

References SHA1ProcessMessageBlock(), shaStateError, and shaSuccess.

Referenced by sha1sum_step_text().

static void SHA1PadMessage ( SHA1Context context) [static]

Definition at line 371 of file Sha1Generator.cpp.

References SHA1ProcessMessageBlock().

Referenced by SHA1Result().

static void SHA1ProcessMessageBlock ( SHA1Context context) [static]

Definition at line 261 of file Sha1Generator.cpp.

References SHA1CircularShift.

Referenced by SHA1Input(), and SHA1PadMessage().

static int SHA1Reset ( SHA1Context context) [static]

Definition at line 103 of file Sha1Generator.cpp.

References shaSuccess.

Referenced by sha1sum_step_text().

static int SHA1Result ( SHA1Context context,
uint8_t  Message_Digest[SHA1HashSize] 
) [static]

Definition at line 140 of file Sha1Generator.cpp.

References SHA1HashSize, SHA1PadMessage(), and shaSuccess.

Referenced by sha1sum_finish().

char* sha1sum_finish ( )
void sha1sum_step_text ( const char *  zText,
int  nBytes 
)

Definition at line 450 of file Sha1Generator.cpp.

References hashLen, incrInit, SHA1Input(), and SHA1Reset().

Referenced by coopy::store::Sha1Generator::add(), and sha1sum_finish().


Variable Documentation

int hashLen = 0 [static]

Definition at line 445 of file Sha1Generator.cpp.

Referenced by sha1sum_finish(), and sha1sum_step_text().

SHA1Context incrCtx [static]

Definition at line 442 of file Sha1Generator.cpp.

int incrInit = 0 [static]

Definition at line 443 of file Sha1Generator.cpp.

Referenced by sha1sum_finish(), and sha1sum_step_text().

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines