SLikeNet 0.1.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
CSHA1 Class Reference

`#include <slikenet/DR_SHA1.h>`

## Public Types

enum | REPORT_TYPE { REPORT_HEX = 0, REPORT_DIGIT = 1, REPORT_HEX_SHORT = 2 }

## Public Member Functions

| CSHA1 ()
| ~CSHA1 ()
void | Reset ()
void | Update (const UINT_8 *pbData, UINT_32 uLen)
bool | HashFile (const TCHAR *tszFileName)
void | Final ()
bool | ReportHash (TCHAR *tszReport, REPORT_TYPE rtReportType=REPORT_HEX) const
bool | ReportHashStl (std::basic_string< TCHAR > &strOut, REPORT_TYPE rtReportType=REPORT_HEX) const
bool | GetHash (UINT_8 *pbDest20) const
unsigned char * | GetHash (void) const

## Static Public Member Functions

static void | HMAC (unsigned char *sharedKey, int sharedKeyLength, unsigned char *data, int dataLength, unsigned char output[SHA1_LENGTH])

## Detailed Description

Definition at line 246 of file DR_SHA1.h.

## Member Enumeration Documentation

enum CSHA1::REPORT_TYPE

Enumerator:

  REPORT_HEX |
  REPORT_DIGIT |
  REPORT_HEX_SHORT |

Definition at line 251 of file DR_SHA1.h.

## Constructor & Destructor Documentation

CSHA1::CSHA1 | ( |  | ) |

Definition at line 51 of file DR_SHA1.cpp.

References Reset().

CSHA1::~CSHA1 | ( |  | ) |

## Member Function Documentation

void CSHA1::Final | ( |  | ) |

Definition at line 178 of file DR_SHA1.cpp.

References UINT_32, UINT_8, and Update().

Referenced by HMAC().

bool CSHA1::GetHash | ( | UINT_8 * | pbDest20 | ) | const

Definition at line 254 of file DR_SHA1.cpp.

Referenced by HMAC().

unsigned char * CSHA1::GetHash | ( | void |  | ) | const

Definition at line 263 of file DR_SHA1.cpp.

bool CSHA1::HashFile | ( | const TCHAR * | tszFileName | ) |

void CSHA1::HMAC | ( | unsigned char * | sharedKey,
|  | int | sharedKeyLength,
|  | unsigned char * | data,
|  | int | dataLength,
|  | unsigned char | output[SHA1_LENGTH]
| ) |  |

static

Definition at line 270 of file DR_SHA1.cpp.

References Final(), GetHash(), Reset(), SHA1_LENGTH, and Update().

bool CSHA1::ReportHash | ( | TCHAR * | tszReport,
|  | REPORT_TYPE | rtReportType = `REPORT_HEX`
| ) |  | const

bool CSHA1::ReportHashStl | ( | std::basic_string< TCHAR > & | strOut,
|  | REPORT_TYPE | rtReportType = `REPORT_HEX`
| ) |  | const

void CSHA1::Reset | ( | void |  | ) |

Definition at line 65 of file DR_SHA1.cpp.

Referenced by CSHA1(), and HMAC().

void CSHA1::Update | ( | const UINT_8 * | pbData,
|  | UINT_32 | uLen
| ) |  |

Definition at line 119 of file DR_SHA1.cpp.

References UINT_32.

Referenced by Final(), and HMAC().

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

- Source/include/slikenet/DR_SHA1.h
- Source/src/DR_SHA1.cpp