CFx SDK Documentation  2023 SP0
Classes | Functions
OdFNVHash.h File Reference
#include "TD_PackPush.h"
#include "TD_PackPop.h"

Go to the source code of this file.

Classes

class  OdFNVHashWrap< Type, szf >
 
class  OdFNVHashWrap< Type, 4 >
 
class  OdFNVHashWrap< Type, 8 >
 
class  OdFNVaHashWrap< Type, szf >
 
class  OdFNVaHashWrap< Type, 4 >
 
class  OdFNVaHashWrap< Type, 8 >
 

Functions

OdUInt32 odFNV32HashBuf (const void *buf, size_t len, OdUInt32 hval=0x811c9dc5)
 
OdUInt32 odFNV32HashStr (const char *str, OdUInt32 hval=0x811c9dc5)
 
OdUInt32 odFNV32aHashBuf (const void *buf, size_t len, OdUInt32 hval=0x811c9dc5)
 
OdUInt32 odFNV32aHashStr (const char *str, OdUInt32 hval=0x811c9dc5)
 
OdUInt64 odFNV64HashBuf (const void *buf, size_t len, OdUInt64 hval=0xcbf29ce484222325ULL)
 
OdUInt64 odFNV64HashStr (const char *str, OdUInt64 hval=0xcbf29ce484222325ULL)
 
OdUInt64 odFNV64aHashBuf (const void *buf, size_t len, OdUInt64 hval=0xcbf29ce484222325ULL)
 
OdUInt64 odFNV64aHashStr (const char *str, OdUInt64 hval=0xcbf29ce484222325ULL)
 

Function Documentation

◆ odFNV32aHashBuf()

OdUInt32 odFNV32aHashBuf ( const void buf,
size_t  len,
OdUInt32  hval = 0x811c9dc5 
)
inline

Perform a 32 bit Fowler/Noll/Vo FNV-1a hash on a buffer.

Parameters
buf[in] Start of buffer to hash.
len[in] Length of buffer in octets.
hval[in] Previous hash value or initial basis if first call.
Returns
32 bit hash as a static hash type.
Remarks
To use the recommended 32 bit FNV-1a hash, use 0x811c9dc5 as the hval.

Definition at line 150 of file OdFNVHash.h.

◆ odFNV32aHashStr()

OdUInt32 odFNV32aHashStr ( const char *  str,
OdUInt32  hval = 0x811c9dc5 
)
inline

Perform a 32 bit Fowler/Noll/Vo FNV-1a hash on a string.

Parameters
str[in] String to hash.
hval[in] Previous hash value or initial basis if first call.
Returns
32 bit hash as a static hash type.
Remarks
To use the recommended 32 bit FNV-1a hash, use 0x811c9dc5 as the hval.

Definition at line 182 of file OdFNVHash.h.

◆ odFNV32HashBuf()

OdUInt32 odFNV32HashBuf ( const void buf,
size_t  len,
OdUInt32  hval = 0x811c9dc5 
)
inline

Perform a 32 bit Fowler/Noll/Vo hash on a buffer.

Parameters
buf[in] Start of buffer to hash.
len[in] Length of buffer in octets.
hval[in] Previous hash value or initial basis if first call.
Returns
32 bit hash as a static hash type.
Remarks
To use the 32 bit FNV-0 historic hash, use 0 as the hval. To use the recommended 32 bit FNV-1 hash, use 0x811c9dc5 as the hval.

Definition at line 85 of file OdFNVHash.h.

◆ odFNV32HashStr()

OdUInt32 odFNV32HashStr ( const char *  str,
OdUInt32  hval = 0x811c9dc5 
)
inline

Perform a 32 bit Fowler/Noll/Vo hash on a string.

Parameters
str[in] String to hash.
hval[in] Previous hash value or initial basis if first call.
Returns
32 bit hash as a static hash type.
Remarks
To use the 32 bit FNV-0 historic hash, use 0 as the hval. To use the recommended 32 bit FNV-1 hash, use 0x811c9dc5 as the hval.

Definition at line 118 of file OdFNVHash.h.

◆ odFNV64aHashBuf()

OdUInt64 odFNV64aHashBuf ( const void buf,
size_t  len,
OdUInt64  hval = 0xcbf29ce484222325ULL 
)
inline

Perform a 64 bit Fowler/Noll/Vo FNV-1a hash on a buffer.

Parameters
buf[in] Start of buffer to hash.
len[in] Length of buffer in octets.
hval[in] Previous hash value or initial basis if first call.
Returns
64 bit hash as a static hash type.
Remarks
To use the recommended 64 bit FNV-1a hash, use 0xcbf29ce484222325 as the hval.

Definition at line 280 of file OdFNVHash.h.

◆ odFNV64aHashStr()

OdUInt64 odFNV64aHashStr ( const char *  str,
OdUInt64  hval = 0xcbf29ce484222325ULL 
)
inline

Perform a 64 bit Fowler/Noll/Vo FNV-1a hash on a string.

Parameters
str[in] String to hash.
hval[in] Previous hash value or initial basis if first call.
Returns
64 bit hash as a static hash type.
Remarks
To use the recommended 64 bit FNV-1a hash, use 0xcbf29ce484222325 as the hval.

Definition at line 312 of file OdFNVHash.h.

◆ odFNV64HashBuf()

OdUInt64 odFNV64HashBuf ( const void buf,
size_t  len,
OdUInt64  hval = 0xcbf29ce484222325ULL 
)
inline

Perform a 64 bit Fowler/Noll/Vo hash on a buffer.

Parameters
buf[in] Start of buffer to hash.
len[in] Length of buffer in octets.
hval[in] Previous hash value or initial basis if first call.
Returns
64 bit hash as a static hash type.
Remarks
To use the 64 bit FNV-0 historic hash, use 0 as the hval. To use the recommended 64 bit FNV-1 hash, use 0xcbf29ce484222325 as the hval.

Definition at line 215 of file OdFNVHash.h.

◆ odFNV64HashStr()

OdUInt64 odFNV64HashStr ( const char *  str,
OdUInt64  hval = 0xcbf29ce484222325ULL 
)
inline

Perform a 64 bit Fowler/Noll/Vo hash on a string.

Parameters
str[in] String to hash.
hval[in] Previous hash value or initial basis if first call.
Returns
64 bit hash as a static hash type.
Remarks
To use the 64 bit FNV-0 historic hash, use 0 as the hval. To use the recommended 64 bit FNV-1 hash, use 0xcbf29ce484222325 as the hval.

Definition at line 248 of file OdFNVHash.h.