CSHA1 Class Reference

#include <source/ariba/utility/misc/sha1.h>

Collaboration diagram for CSHA1:

Collaboration graph
[legend]

List of all members.

Public Types

enum  { REPORT_HEX = 0, REPORT_DIGIT = 1 }

Public Member Functions

 CSHA1 ()
 ~CSHA1 ()
void Reset ()
void Update (UINT_8 *data, UINT_32 len)
bool HashFile (char *szFileName)
void Final ()
void ReportHash (char *szReport, unsigned char uReportType=REPORT_HEX)
void GetHash (UINT_8 *puDest)

Public Attributes

UINT_32 m_state [5]
UINT_32 m_count [2]
UINT_32 __reserved1 [1]
UINT_8 m_buffer [64]
UINT_8 m_digest [20]
UINT_32 __reserved2 [3]

Private Member Functions

void Transform (UINT_32 *state, UINT_8 *buffer)

Private Attributes

UINT_8 m_workspace [64]
SHA1_WORKSPACE_BLOCKm_block


Detailed Description

Definition at line 72 of file sha1.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
REPORT_HEX 
REPORT_DIGIT 

Definition at line 77 of file sha1.h.


Constructor & Destructor Documentation

CSHA1::CSHA1 (  ) 

Definition at line 61 of file sha1.cpp.

References m_block, m_workspace, and Reset().

CSHA1::~CSHA1 (  ) 

Definition at line 68 of file sha1.cpp.

References Reset().


Member Function Documentation

void CSHA1::Final (  ) 

Definition at line 265 of file sha1.cpp.

References m_buffer, m_count, m_digest, m_state, Transform(), UINT_32, UINT_8, and Update().

Referenced by ariba::utility::Identifier::sha1().

void CSHA1::GetHash ( UINT_8 *  puDest  ) 

Definition at line 328 of file sha1.cpp.

References m_digest.

Referenced by ariba::utility::Identifier::sha1().

bool CSHA1::HashFile ( char *  szFileName  ) 

Definition at line 218 of file sha1.cpp.

References SHA1_MAX_FILE_BUFFER, UINT_8, and Update().

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

Definition at line 298 of file sha1.cpp.

References m_digest, REPORT_DIGIT, and REPORT_HEX.

void CSHA1::Reset (  ) 

Definition at line 73 of file sha1.cpp.

References m_count, and m_state.

Referenced by CSHA1(), ariba::utility::Identifier::sha1(), and ~CSHA1().

void CSHA1::Transform ( UINT_32 *  state,
UINT_8 *  buffer 
) [private]

Definition at line 86 of file sha1.cpp.

References _R0, _R1, _R2, _R3, _R4, m_block, and UINT_32.

Referenced by Final(), and Update().

void CSHA1::Update ( UINT_8 *  data,
UINT_32  len 
)

Definition at line 190 of file sha1.cpp.

References m_buffer, m_count, m_state, Transform(), and UINT_32.

Referenced by Final(), HashFile(), and ariba::utility::Identifier::sha1().


Member Data Documentation

UINT_32 CSHA1::__reserved1[1]

Definition at line 90 of file sha1.h.

UINT_32 CSHA1::__reserved2[3]

Definition at line 93 of file sha1.h.

Definition at line 121 of file sha1.h.

Referenced by CSHA1(), and Transform().

UINT_8 CSHA1::m_buffer[64]

Definition at line 91 of file sha1.h.

Referenced by Final(), and Update().

UINT_32 CSHA1::m_count[2]

Definition at line 89 of file sha1.h.

Referenced by Final(), Reset(), and Update().

UINT_8 CSHA1::m_digest[20]

Definition at line 92 of file sha1.h.

Referenced by Final(), GetHash(), and ReportHash().

UINT_32 CSHA1::m_state[5]

Definition at line 88 of file sha1.h.

Referenced by Final(), Reset(), and Update().

UINT_8 CSHA1::m_workspace[64] [private]

Definition at line 120 of file sha1.h.

Referenced by CSHA1().


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

Generated on Fri Aug 14 23:38:41 2009 for Ariba by  doxygen 1.5.8