VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto/Rmd160.h
blob: 81b5d6f0a2a4244d45269033e5b0e73df04a45c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef TC_HEADER_Crypto_Ripemd160
#define TC_HEADER_Crypto_Ripemd160

#include "Common/Tcdefs.h"

#if defined(__cplusplus)
extern "C"
{
#endif

#define RIPEMD160_BLOCK_LENGTH 64

typedef struct RMD160Context
{
	unsigned __int32 state[5];
#ifndef TC_WINDOWS_BOOT
	uint64 count;
#else
	uint32 count;
#endif
	unsigned char buffer[RIPEMD160_BLOCK_LENGTH];
} RMD160_CTX;

void RMD160Init (RMD160_CTX *ctx);
void RMD160Transform (unsigned __int32 *state, const unsigned __int32 *data);
void RMD160Update (RMD160_CTX *ctx, const unsigned char *input, unsigned __int32 len);
void RMD160Final (unsigned char *digest, RMD160_CTX *ctx);

#if defined(__cplusplus)
}
#endif

#endif // TC_HEADER_Crypto_Ripemd160
="nf">FromNumber (double number); static wstring FromNumber (int32 number); static wstring FromNumber (uint32 number); static wstring FromNumber (int64 number); static wstring FromNumber (uint64 number); static string GetTrailingNumber (const string &str); static string GetTypeName (const type_info &typeInfo); static wstring QuoteSpaces (const wstring &str); static vector <string> Split (const string &str, const string &separators = " \t\r\n", bool returnEmptyFields = false); static string StripTrailingNumber (const string &str); static wstring ToExceptionString (const exception &ex); static string ToLower (const string &str); static uint32 ToUInt32 (const string &str); static uint32 ToUInt32 (const wstring &str); static int32 ToInt32 (const string &str); static int32 ToInt32 (const wstring &str); static uint64 ToUInt64 (const string &str); static uint64 ToUInt64 (const wstring &str); static int64 ToInt64 (const string &str); static int64 ToInt64 (const wstring &str); static string ToSingle (double number) { return ToSingle (FromNumber (number)); } static string ToSingle (int32 number) { return ToSingle (FromNumber (number)); } static string ToSingle (uint32 number) { return ToSingle (FromNumber (number)); } static string ToSingle (int64 number) { return ToSingle (FromNumber (number)); } static string ToSingle (uint64 number) { return ToSingle (FromNumber (number)); } static string ToSingle (const wstring &wstr, bool noThrow = false); static void ToSingle (const wstring &wstr, string &str, bool noThrow = false); static string ToUpper (const string &str); static wstring ToWide (double number) { return FromNumber (number); } static wstring ToWide (int32 number) { return FromNumber (number); } static wstring ToWide (uint32 number) { return FromNumber (number); } static wstring ToWide (int64 number) { return FromNumber (number); } static wstring ToWide (uint64 number) { return FromNumber (number); } static wstring ToWide (const string &str, bool noThrow = false); static void ToWideBuffer (const wstring &str, wchar_t *buffer, size_t bufferSize); static string Trim (const string &str); private: StringConverter (); }; } #endif // TC_HEADER_Platform_StringConverter