75 #ifndef ___SHA1_HDR___ 76 #define ___SHA1_HDR___ 78 #if !defined(SHA1_UTILITY_FUNCTIONS) && !defined(SHA1_NO_UTILITY_FUNCTIONS) 79 #define SHA1_UTILITY_FUNCTIONS 82 #if !defined(SHA1_STL_FUNCTIONS) && !defined(SHA1_NO_STL_FUNCTIONS) 83 #define SHA1_STL_FUNCTIONS 84 #if !defined(SHA1_UTILITY_FUNCTIONS) 85 #error STL functions require SHA1_UTILITY_FUNCTIONS. 91 #ifdef SHA1_UTILITY_FUNCTIONS 96 #ifdef SHA1_STL_FUNCTIONS 108 #if !defined(SHA1_LITTLE_ENDIAN) && !defined(SHA1_BIG_ENDIAN) 109 #define SHA1_LITTLE_ENDIAN 115 #if !defined(SHA1_WIPE_VARIABLES) && !defined(SHA1_NO_WIPE_VARIABLES) 116 #define SHA1_WIPE_VARIABLES 119 #if defined(SHA1_HAS_TCHAR) 129 #define _T(__x) (__x) 131 #define _tprintf printf 133 #define _tcslen strlen 134 #define _tfopen fopen 135 #define _tcscpy strcpy 136 #define _tcscat strcat 137 #define _sntprintf snprintf 142 #ifdef _MSC_VER // Compiling with Microsoft compiler 143 #define _fseeki64 _fseeki64 144 #define _ftelli64 _ftelli64 145 #elif __MINGW || defined(__MINGW32__) 146 #define _fseeki64 fseeko64 147 #define _ftelli64 ftello64 148 #else // assume POSIX 149 #define _fseeki64 fseeko 150 #define _ftelli64 ftello 157 #ifdef _MSC_VER // Compiling with Microsoft compiler 158 #define UINT_8 unsigned __int8 160 #define UINT_8 unsigned char 165 #ifdef _MSC_VER // Compiling with Microsoft compiler 166 #define UINT_32 unsigned __int32 168 #if (ULONG_MAX == 0xFFFFFFFF) 169 #define UINT_32 unsigned long 171 #define UINT_32 unsigned int 177 #ifdef _MSC_VER // Compiling with Microsoft compiler 178 #define INT_64 __int64 180 #define INT_64 long long 185 #ifdef _MSC_VER // Compiling with Microsoft compiler 186 #define UINT_64 unsigned __int64 188 #define UINT_64 unsigned long long 204 #ifdef SHA1_UTILITY_FUNCTIONS 230 #ifdef SHA1_UTILITY_FUNCTIONS 238 #ifdef SHA1_UTILITY_FUNCTIONS 242 #ifdef SHA1_STL_FUNCTIONS 258 #endif // ___SHA1_HDR___
bool ReportHash(TCHAR *tszReport, REPORT_TYPE rtReportType=REPORT_HEX) const
bool GetHash(UINT_8 *pbDest) const
bool HashFile(const TCHAR *tszFileName)
void Update(const UINT_8 *pbData, UINT_32 uLen)
SHA1_WORKSPACE_BLOCK * m_block
bool ReportHashStl(std::basic_string< TCHAR > &strOut, REPORT_TYPE rtReportType=REPORT_HEX) const
void Transform(UINT_32 *pState, const UINT_8 *pBuffer)