SHOGUN v0.9.0
公有成员 | 静态公有成员 | 静态保护成员
CHash类参考

详细描述

Collection of Hashing Functions.

This class implements a number of hashing functions like crc32, md5 and murmur.

在文件Hash.h55行定义。

继承图,类CHash
Inheritance graph
[图例]

所有成员的列表。

公有成员

 CHash ()
virtual ~CHash ()
virtual const char * get_name () const

静态公有成员

static uint32_t crc32 (uint8_t *data, int32_t len)
static void MD5 (unsigned char *x, unsigned l, unsigned char *buf)
static uint32_t MurmurHash2 (uint8_t *data, int32_t len, uint32_t seed)
static uint32_t IncrementalMurmurHash2 (uint8_t data, uint32_t h)

静态保护成员

static void MD5Init (struct MD5Context *context)
static void MD5Update (struct MD5Context *context, unsigned char const *buf, unsigned len)
static void MD5Final (unsigned char digest[16], struct MD5Context *context)
static void MD5Transform (uint32_t buf[4], uint32_t const in[16])

构造及析构函数文档

CHash ( )

default constructor

在文件Hash.h59行定义。

virtual ~CHash ( ) [virtual]

default destructor

在文件Hash.h61行定义。


成员函数文档

uint32_t crc32 ( uint8_t *  data,
int32_t  len 
) [static]

crc32 checksumming

参数:
datadata to checksum
lenlength in number of bytes

在文件Hash.cpp46行定义。

virtual const char* get_name ( void  ) const [virtual]
返回:
object name

实现了CSGObject

在文件Hash.h99行定义。

uint32_t IncrementalMurmurHash2 ( uint8_t  data,
uint32_t  h 
) [static]

Incremental Murmur like Hash

参数:
databyte to hash
hinitial seed / hash on subsequent calls
返回:
hash

在文件Hash.cpp423行定义。

void MD5 ( unsigned char *  x,
unsigned  l,
unsigned char *  buf 
) [static]

Wrapper for MD5 function compatible to OpenSSL interface.

参数:
xdata
llength
bufbuf needs to provide an allocated array of 16 bytes for the digest.

在文件Hash.cpp73行定义。

void MD5Final ( unsigned char  digest[16],
struct MD5Context *  context 
) [static, protected]

Final wrapup - pad to 64-byte boundary with the bit pattern 1 0* (64-bit count of bits processed, MSB-first)

参数:
digestthe 64 byte hash
contextinitialized MD5Context

在文件Hash.cpp160行定义。

void MD5Init ( struct MD5Context *  context) [static, protected]

Start MD5 accumulation. Set bit count to 0 and buffer to mysterious initialization constants.

参数:
contextMD5Context

在文件Hash.cpp104行定义。

void MD5Transform ( uint32_t  buf[4],
uint32_t const  in[16] 
) [static, protected]

The core of the MD5 algorithm, this alters an existing MD5 hash to reflect the addition of 16 longwords of new data. MD5Update blocks the data and converts bytes into longwords for this routine.

参数:
buf16 byte
in64 bytes

在文件Hash.cpp220行定义。

void MD5Update ( struct MD5Context *  context,
unsigned char const *  buf,
unsigned  len 
) [static, protected]

Update context to reflect the concatenation of another buffer full of bytes.

参数:
contextinitialized MD5Context
bufbuffer to hash
lenlength of buffer

在文件Hash.cpp115行定义。

uint32_t MurmurHash2 ( uint8_t *  data,
int32_t  len,
uint32_t  seed 
) [static]

Murmur Hash2

参数:
datadata to checksum (needs to be 32bit aligned on some archs)
lenlength in number of bytes
seedinitial seed
返回:
hash

在文件Hash.cpp374行定义。


该类的文档由以下文件生成:

SHOGUN Machine Learning Toolbox - Documentation