xoreos  0.0.5
Namespaces | Enumerations | Functions | Variables
hash.h File Reference

Utility hash functions. More...

#include "src/common/types.h"
#include "src/common/scopedptr.h"
#include "src/common/ustring.h"
#include "src/common/encoding.h"
#include "src/common/memreadstream.h"
Include dependency graph for hash.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Common
 

Enumerations

enum  Common::HashAlgo {
  Common::kHashNone = -1, Common::kHashDJB2 = 0, Common::kHashFNV32 = 1, Common::kHashFNV64 = 2,
  Common::kHashCRC32 = 3, Common::kHashMAX
}
 The algorithm used for hashing. More...
 

Functions

static uint32 Common::hashDJB2 (uint32 hash, uint32 c)
 
static uint32 Common::hashStringDJB2 (const UString &string)
 
static uint32 Common::hashStringDJB2 (const UString &string, Encoding encoding)
 
static uint32 Common::hashFNV32 (uint32 hash, uint32 c)
 
static uint32 Common::hashStringFNV32 (const UString &string)
 
static uint32 Common::hashStringFNV32 (const UString &string, Encoding encoding)
 
static uint64 Common::hashFNV64 (uint64 hash, uint32 c)
 
static uint64 Common::hashStringFNV64 (const UString &string)
 
static uint64 Common::hashStringFNV64 (const UString &string, Encoding encoding)
 
static uint32 Common::hashCRC32 (uint32 hash, uint32 c)
 
static uint32 Common::hashStringCRC32 (const UString &string)
 
static uint32 Common::hashStringCRC32 (const UString &string, Encoding encoding)
 
static uint64 Common::hashString (const UString &string, HashAlgo algo)
 Hash the string with the given algorithm, as a series of UTF-8 characters. More...
 
static uint64 Common::hashString (const UString &string, HashAlgo algo, Encoding encoding)
 Hash the string with the given algorithm, as a series of bytes in the given encoding. More...
 
static UString Common::formatHash (uint64 hash)
 

Variables

static const uint32 Common::kCRC32Tab []
 Table of CRC32 polynomial feedback terms. More...
 

Detailed Description

Utility hash functions.

Definition in file hash.h.