Sha1Transform Class Reference

#include <sha1transform.h>

List of all members.


Detailed Description

Perform SHA-1 Checksumming on data.

Definition at line 33 of file sha1transform.h.


Public Member Functions

 Sha1Transform ()
 Constructor.
 ~Sha1Transform ()
 Destructor.
int sumUp (const char *data, uint32_t length)
 Checksum data.
int sumUp (const unsigned char *data, uint32_t length)
 Checksum data.
Hash< SHA1HashgetHash ()
 Retrieve results.

Private Member Functions

void SHA1ProcessMessageBlock ()
void SHA1PadMessage ()

Private Attributes

uint32_t Intermediate_Hash [SHA1HashSize/4]
 Message Digest.
uint32_t Length_Low
 Message length in bits.
uint32_t Length_High
 Message length in bits.
int Message_Block_Index
 Index into message block array.
uint8_t Message_Block [64]
 512-bit message blocks
int Computed
 Is the digest computed?
int Corrupted
 Is the message digest corrupted?

Constructor & Destructor Documentation

Sha1Transform::Sha1Transform  ) 
 

Constructor.

Definition at line 203 of file sha1transform.cpp.

References Computed, Corrupted, Intermediate_Hash, Length_High, Length_Low, and Message_Block_Index.

Sha1Transform::~Sha1Transform  ) 
 

Destructor.

Definition at line 218 of file sha1transform.cpp.


Member Function Documentation

Hash< SHA1Hash > Sha1Transform::getHash  ) 
 

Retrieve results.

Note that this object should be destroyed after retrieving hash - continueing to calculate hash will result in abnormal program termination (in debug mode).

Definition at line 264 of file sha1transform.cpp.

References Computed, Corrupted, Intermediate_Hash, Length_High, Length_Low, Message_Block, SHA1HashSize, and SHA1PadMessage().

Referenced by SHA1HashMaker::getHashSet(), BTHashMaker::getHashSet(), and BTHashMaker::sumUp().

Here is the call graph for this function:

void Sha1Transform::SHA1PadMessage  )  [private]
 

Definition at line 162 of file sha1transform.cpp.

References Length_High, Length_Low, Message_Block, Message_Block_Index, and SHA1ProcessMessageBlock().

Referenced by getHash().

Here is the call graph for this function:

void Sha1Transform::SHA1ProcessMessageBlock  )  [private]
 

Definition at line 60 of file sha1transform.cpp.

References Intermediate_Hash, Message_Block, Message_Block_Index, and SHA1CircularShift.

Referenced by SHA1PadMessage(), and sumUp().

int Sha1Transform::sumUp const unsigned char *  data,
uint32_t  length
 

Checksum data.

Definition at line 260 of file sha1transform.cpp.

References sumUp().

Here is the call graph for this function:

int Sha1Transform::sumUp const char *  data,
uint32_t  length
 

Checksum data.

Definition at line 221 of file sha1transform.cpp.

References Computed, Corrupted, Length_High, Length_Low, Message_Block, Message_Block_Index, SHA1ProcessMessageBlock(), shaNull, shaStateError, and shaSuccess.

Referenced by sumUp(), SHA1HashMaker::sumUp(), and BTHashMaker::sumUp().

Here is the call graph for this function:


Member Data Documentation

int Sha1Transform::Computed [private]
 

Is the digest computed?

Definition at line 68 of file sha1transform.h.

Referenced by getHash(), Sha1Transform(), and sumUp().

int Sha1Transform::Corrupted [private]
 

Is the message digest corrupted?

Definition at line 71 of file sha1transform.h.

Referenced by getHash(), Sha1Transform(), and sumUp().

uint32_t Sha1Transform::Intermediate_Hash[SHA1HashSize/4] [private]
 

Message Digest.

Definition at line 53 of file sha1transform.h.

Referenced by getHash(), SHA1ProcessMessageBlock(), and Sha1Transform().

uint32_t Sha1Transform::Length_High [private]
 

Message length in bits.

Definition at line 59 of file sha1transform.h.

Referenced by getHash(), SHA1PadMessage(), Sha1Transform(), and sumUp().

uint32_t Sha1Transform::Length_Low [private]
 

Message length in bits.

Definition at line 56 of file sha1transform.h.

Referenced by getHash(), SHA1PadMessage(), Sha1Transform(), and sumUp().

uint8_t Sha1Transform::Message_Block[64] [private]
 

512-bit message blocks

Definition at line 65 of file sha1transform.h.

Referenced by getHash(), SHA1PadMessage(), SHA1ProcessMessageBlock(), and sumUp().

int Sha1Transform::Message_Block_Index [private]
 

Index into message block array.

Definition at line 62 of file sha1transform.h.

Referenced by SHA1PadMessage(), SHA1ProcessMessageBlock(), Sha1Transform(), and sumUp().


The documentation for this class was generated from the following files: