Classes | Public Types | Public Member Functions | Public Attributes

CSHA1 Class Reference

#include <SHA1.h>

List of all members.

Classes

union  SHA1_WORKSPACE_BLOCK

Public Types

enum  { REPORT_HEX = 0, REPORT_DIGIT = 1 }

Public Member Functions

 CSHA1 ()
 SHA-1 Hash key computation.
virtual ~CSHA1 ()
void Reset ()
void Update (unsigned char *data, unsigned int len)
bool HashFile (char *szFileName)
void Final ()
void ReportHash (char *szReport, unsigned char uReportType=REPORT_HEX)
void GetHash (unsigned char *uDest)
unsigned char * GetHash (void) const

Public Attributes

unsigned int m_state [5]
unsigned int m_count [2]
unsigned char m_buffer [64]
unsigned char m_digest [20]

Detailed Description

Definition at line 33 of file SHA1.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
REPORT_HEX 
REPORT_DIGIT 

Definition at line 63 of file SHA1.h.


Constructor & Destructor Documentation

CSHA1::CSHA1 (  ) 

SHA-1 Hash key computation.

100% free public domain implementation of the SHA-1 algorithm by Dominik Reichl <Dominik.Reichl@tiscali.de>

=== Test Vectors (from FIPS PUB 180-1) ===

"abc" A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D

"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1

A million repetitions of "a" 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F

Definition at line 25 of file SHA1.cpp.

Here is the call graph for this function:

CSHA1::~CSHA1 (  )  [virtual]

Definition at line 30 of file SHA1.cpp.

Here is the call graph for this function:


Member Function Documentation

void CSHA1::Final (  ) 

Definition at line 240 of file SHA1.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned char * CSHA1::GetHash ( void   )  const

Definition at line 323 of file SHA1.cpp.

void CSHA1::GetHash ( unsigned char *  uDest  ) 

Definition at line 316 of file SHA1.cpp.

Here is the caller graph for this function:

bool CSHA1::HashFile ( char *  szFileName  ) 

Definition at line 194 of file SHA1.cpp.

Here is the call graph for this function:

void CSHA1::ReportHash ( char *  szReport,
unsigned char  uReportType = REPORT_HEX 
)

Definition at line 281 of file SHA1.cpp.

void CSHA1::Reset ( void   ) 

Definition at line 36 of file SHA1.cpp.

Here is the caller graph for this function:

void CSHA1::Update ( unsigned char *  data,
unsigned int  len 
)

Definition at line 163 of file SHA1.cpp.

Here is the caller graph for this function:


Member Data Documentation

unsigned char CSHA1::m_buffer[64]

Definition at line 71 of file SHA1.h.

unsigned int CSHA1::m_count[2]

Definition at line 70 of file SHA1.h.

unsigned char CSHA1::m_digest[20]

Definition at line 72 of file SHA1.h.

unsigned int CSHA1::m_state[5]

Definition at line 69 of file SHA1.h.


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