A Collection of checksum functions. More...

#include <hash_functions.h>

Static Public Member Functions

static uint32_t adler32 (const void *data, int size, uint32_t running_adler32=0)
 Calculate a CRC32 checksum on the data. More...
 
static uint32_t crc32 (const void *data, int size, uint32_t running_crc=0)
 Calculate a CRC32 checksum on the data. More...
 
static std::string md5 (const void *data, int size, bool uppercase=false)
 Generate SHA-1 hash from data. More...
 
static std::string md5 (const std::string &data, bool uppercase=false)
 MD5. More...
 
static std::string md5 (const DataBuffer &data, bool uppercase=false)
 MD5. More...
 
static void md5 (const void *data, int size, unsigned char out_hash[16])
 MD5. More...
 
static void md5 (const std::string &data, unsigned char out_hash[16])
 MD5. More...
 
static void md5 (const DataBuffer &data, unsigned char out_hash[16])
 MD5. More...
 
static std::string sha1 (const void *data, int size, bool uppercase=false)
 Generate SHA-1 hash from data. More...
 
static std::string sha1 (const std::string &data, bool uppercase=false)
 SHA1. More...
 
static std::string sha1 (const DataBuffer &data, bool uppercase=false)
 SHA1. More...
 
static void sha1 (const void *data, int size, unsigned char out_hash[20])
 SHA1. More...
 
static void sha1 (const std::string &data, unsigned char out_hash[20])
 SHA1. More...
 
static void sha1 (const DataBuffer &data, unsigned char out_hash[20])
 SHA1. More...
 
static std::string sha224 (const void *data, int size, bool uppercase=false)
 Generate SHA-224 hash from data. More...
 
static std::string sha224 (const std::string &data, bool uppercase=false)
 SHA224. More...
 
static std::string sha224 (const DataBuffer &data, bool uppercase=false)
 SHA224. More...
 
static void sha224 (const void *data, int size, unsigned char out_hash[28])
 SHA224. More...
 
static void sha224 (const std::string &data, unsigned char out_hash[28])
 SHA224. More...
 
static void sha224 (const DataBuffer &data, unsigned char out_hash[28])
 SHA224. More...
 
static std::string sha256 (const void *data, int size, bool uppercase=false)
 Generate SHA-256 hash from data. More...
 
static std::string sha256 (const std::string &data, bool uppercase=false)
 SHA256. More...
 
static std::string sha256 (const DataBuffer &data, bool uppercase=false)
 SHA256. More...
 
static void sha256 (const void *data, int size, unsigned char out_hash[32])
 SHA256. More...
 
static void sha256 (const std::string &data, unsigned char out_hash[32])
 SHA256. More...
 
static void sha256 (const DataBuffer &data, unsigned char out_hash[32])
 SHA256. More...
 
static std::string sha384 (const void *data, int size, bool uppercase=false)
 Generate SHA-384 hash from data. More...
 
static std::string sha384 (const std::string &data, bool uppercase=false)
 SHA384. More...
 
static std::string sha384 (const DataBuffer &data, bool uppercase=false)
 SHA384. More...
 
static void sha384 (const void *data, int size, unsigned char out_hash[48])
 SHA384. More...
 
static void sha384 (const std::string &data, unsigned char out_hash[48])
 SHA384. More...
 
static void sha384 (const DataBuffer &data, unsigned char out_hash[48])
 SHA384. More...
 
static std::string sha512 (const void *data, int size, bool uppercase=false)
 Generate SHA-512 hash from data. More...
 
static std::string sha512 (const std::string &data, bool uppercase=false)
 SHA512. More...
 
static std::string sha512 (const DataBuffer &data, bool uppercase=false)
 SHA512. More...
 
static void sha512 (const void *data, int size, unsigned char out_hash[64])
 SHA512. More...
 
static void sha512 (const std::string &data, unsigned char out_hash[64])
 SHA512. More...
 
static void sha512 (const DataBuffer &data, unsigned char out_hash[64])
 SHA512. More...
 
static std::string sha512_224 (const void *data, int size, bool uppercase=false)
 Generate SHA-512_224 hash from data. More...
 
static std::string sha512_224 (const std::string &data, bool uppercase=false)
 SHA512_224. More...
 
static std::string sha512_224 (const DataBuffer &data, bool uppercase=false)
 SHA512_224. More...
 
static void sha512_224 (const void *data, int size, unsigned char out_hash[28])
 SHA512_224. More...
 
static void sha512_224 (const std::string &data, unsigned char out_hash[28])
 SHA512_224. More...
 
static void sha512_224 (const DataBuffer &data, unsigned char out_hash[28])
 SHA512_224. More...
 
static std::string sha512_256 (const void *data, int size, bool uppercase=false)
 Generate SHA-512_256 hash from data. More...
 
static std::string sha512_256 (const std::string &data, bool uppercase=false)
 SHA512_256. More...
 
static std::string sha512_256 (const DataBuffer &data, bool uppercase=false)
 SHA512_256. More...
 
static void sha512_256 (const void *data, int size, unsigned char out_hash[32])
 SHA512_256. More...
 
static void sha512_256 (const std::string &data, unsigned char out_hash[32])
 SHA512_256. More...
 
static void sha512_256 (const DataBuffer &data, unsigned char out_hash[32])
 SHA512_256. More...
 

Detailed Description

A Collection of checksum functions.

Member Function Documentation

static uint32_t clan::HashFunctions::adler32 ( const void *  data,
int  size,
uint32_t  running_adler32 = 0 
)
static

Calculate a CRC32 checksum on the data.

static uint32_t clan::HashFunctions::crc32 ( const void *  data,
int  size,
uint32_t  running_crc = 0 
)
static

Calculate a CRC32 checksum on the data.

static std::string clan::HashFunctions::md5 ( const void *  data,
int  size,
bool  uppercase = false 
)
static

Generate SHA-1 hash from data.

static std::string clan::HashFunctions::md5 ( const std::string data,
bool  uppercase = false 
)
static

MD5.

Parameters
data= String Ref8
uppercase= bool
Returns
String8
static std::string clan::HashFunctions::md5 ( const DataBuffer data,
bool  uppercase = false 
)
static

MD5.

Parameters
data= Data Buffer
uppercase= bool
Returns
String8
static void clan::HashFunctions::md5 ( const void *  data,
int  size,
unsigned char  out_hash[16] 
)
static

MD5.

Parameters
data= void
size= value
out_hash= char
static void clan::HashFunctions::md5 ( const std::string data,
unsigned char  out_hash[16] 
)
static

MD5.

Parameters
data= String Ref8
out_hash= char
static void clan::HashFunctions::md5 ( const DataBuffer data,
unsigned char  out_hash[16] 
)
static

MD5.

Parameters
data= Data Buffer
out_hash= char
static std::string clan::HashFunctions::sha1 ( const void *  data,
int  size,
bool  uppercase = false 
)
static

Generate SHA-1 hash from data.

static std::string clan::HashFunctions::sha1 ( const std::string data,
bool  uppercase = false 
)
static

SHA1.

Parameters
data= String Ref8
uppercase= bool
Returns
String8
static std::string clan::HashFunctions::sha1 ( const DataBuffer data,
bool  uppercase = false 
)
static

SHA1.

Parameters
data= Data Buffer
uppercase= bool
Returns
String8
static void clan::HashFunctions::sha1 ( const void *  data,
int  size,
unsigned char  out_hash[20] 
)
static

SHA1.

Parameters
data= void
size= value
out_hash= char
static void clan::HashFunctions::sha1 ( const std::string data,
unsigned char  out_hash[20] 
)
static

SHA1.

Parameters
data= String Ref8
out_hash= char
static void clan::HashFunctions::sha1 ( const DataBuffer data,
unsigned char  out_hash[20] 
)
static

SHA1.

Parameters
data= Data Buffer
out_hash= char
static std::string clan::HashFunctions::sha224 ( const void *  data,
int  size,
bool  uppercase = false 
)
static

Generate SHA-224 hash from data.

static std::string clan::HashFunctions::sha224 ( const std::string data,
bool  uppercase = false 
)
static

SHA224.

Parameters
data= String Ref8
uppercase= bool
Returns
String8
static std::string clan::HashFunctions::sha224 ( const DataBuffer data,
bool  uppercase = false 
)
static

SHA224.

Parameters
data= Data Buffer
uppercase= bool
Returns
String8
static void clan::HashFunctions::sha224 ( const void *  data,
int  size,
unsigned char  out_hash[28] 
)
static

SHA224.

Parameters
data= void
size= value
out_hash= char
static void clan::HashFunctions::sha224 ( const std::string data,
unsigned char  out_hash[28] 
)
static

SHA224.

Parameters
data= String Ref8
out_hash= char
static void clan::HashFunctions::sha224 ( const DataBuffer data,
unsigned char  out_hash[28] 
)
static

SHA224.

Parameters
data= Data Buffer
out_hash= char
static std::string clan::HashFunctions::sha256 ( const void *  data,
int  size,
bool  uppercase = false 
)
static

Generate SHA-256 hash from data.

static std::string clan::HashFunctions::sha256 ( const std::string data,
bool  uppercase = false 
)
static

SHA256.

Parameters
data= String Ref8
uppercase= bool
Returns
String8
static std::string clan::HashFunctions::sha256 ( const DataBuffer data,
bool  uppercase = false 
)
static

SHA256.

Parameters
data= Data Buffer
uppercase= bool
Returns
String8
static void clan::HashFunctions::sha256 ( const void *  data,
int  size,
unsigned char  out_hash[32] 
)
static

SHA256.

Parameters
data= void
size= value
out_hash= char
static void clan::HashFunctions::sha256 ( const std::string data,
unsigned char  out_hash[32] 
)
static

SHA256.

Parameters
data= String Ref8
out_hash= char
static void clan::HashFunctions::sha256 ( const DataBuffer data,
unsigned char  out_hash[32] 
)
static

SHA256.

Parameters
data= Data Buffer
out_hash= char
static std::string clan::HashFunctions::sha384 ( const void *  data,
int  size,
bool  uppercase = false 
)
static

Generate SHA-384 hash from data.

static std::string clan::HashFunctions::sha384 ( const std::string data,
bool  uppercase = false 
)
static

SHA384.

Parameters
data= String Ref8
uppercase= bool
Returns
String8
static std::string clan::HashFunctions::sha384 ( const DataBuffer data,
bool  uppercase = false 
)
static

SHA384.

Parameters
data= Data Buffer
uppercase= bool
Returns
String8
static void clan::HashFunctions::sha384 ( const void *  data,
int  size,
unsigned char  out_hash[48] 
)
static

SHA384.

Parameters
data= void
size= value
out_hash= char
static void clan::HashFunctions::sha384 ( const std::string data,
unsigned char  out_hash[48] 
)
static

SHA384.

Parameters
data= String Ref8
out_hash= char
static void clan::HashFunctions::sha384 ( const DataBuffer data,
unsigned char  out_hash[48] 
)
static

SHA384.

Parameters
data= Data Buffer
out_hash= char
static std::string clan::HashFunctions::sha512 ( const void *  data,
int  size,
bool  uppercase = false 
)
static

Generate SHA-512 hash from data.

static std::string clan::HashFunctions::sha512 ( const std::string data,
bool  uppercase = false 
)
static

SHA512.

Parameters
data= String Ref8
uppercase= bool
Returns
String8
static std::string clan::HashFunctions::sha512 ( const DataBuffer data,
bool  uppercase = false 
)
static

SHA512.

Parameters
data= Data Buffer
uppercase= bool
Returns
String8
static void clan::HashFunctions::sha512 ( const void *  data,
int  size,
unsigned char  out_hash[64] 
)
static

SHA512.

Parameters
data= void
size= value
out_hash= char
static void clan::HashFunctions::sha512 ( const std::string data,
unsigned char  out_hash[64] 
)
static

SHA512.

Parameters
data= String Ref8
out_hash= char
static void clan::HashFunctions::sha512 ( const DataBuffer data,
unsigned char  out_hash[64] 
)
static

SHA512.

Parameters
data= Data Buffer
out_hash= char
static std::string clan::HashFunctions::sha512_224 ( const void *  data,
int  size,
bool  uppercase = false 
)
static

Generate SHA-512_224 hash from data.

static std::string clan::HashFunctions::sha512_224 ( const std::string data,
bool  uppercase = false 
)
static

SHA512_224.

Parameters
data= String Ref8
uppercase= bool
Returns
String8
static std::string clan::HashFunctions::sha512_224 ( const DataBuffer data,
bool  uppercase = false 
)
static

SHA512_224.

Parameters
data= Data Buffer
uppercase= bool
Returns
String8
static void clan::HashFunctions::sha512_224 ( const void *  data,
int  size,
unsigned char  out_hash[28] 
)
static

SHA512_224.

Parameters
data= void
size= value
out_hash= char
static void clan::HashFunctions::sha512_224 ( const std::string data,
unsigned char  out_hash[28] 
)
static

SHA512_224.

Parameters
data= String Ref8
out_hash= char
static void clan::HashFunctions::sha512_224 ( const DataBuffer data,
unsigned char  out_hash[28] 
)
static

SHA512_224.

Parameters
data= Data Buffer
out_hash= char
static std::string clan::HashFunctions::sha512_256 ( const void *  data,
int  size,
bool  uppercase = false 
)
static

Generate SHA-512_256 hash from data.

static std::string clan::HashFunctions::sha512_256 ( const std::string data,
bool  uppercase = false 
)
static

SHA512_256.

Parameters
data= String Ref8
uppercase= bool
Returns
String8
static std::string clan::HashFunctions::sha512_256 ( const DataBuffer data,
bool  uppercase = false 
)
static

SHA512_256.

Parameters
data= Data Buffer
uppercase= bool
Returns
String8
static void clan::HashFunctions::sha512_256 ( const void *  data,
int  size,
unsigned char  out_hash[32] 
)
static

SHA512_256.

Parameters
data= void
size= value
out_hash= char
static void clan::HashFunctions::sha512_256 ( const std::string data,
unsigned char  out_hash[32] 
)
static

SHA512_256.

Parameters
data= String Ref8
out_hash= char
static void clan::HashFunctions::sha512_256 ( const DataBuffer data,
unsigned char  out_hash[32] 
)
static

SHA512_256.

Parameters
data= Data Buffer
out_hash= char

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