BDE 4.14.0 Production release
Loading...
Searching...
No Matches

Classes

class  DefaultHashAlgorithm
 
class  DefaultSeededHashAlgorithm
 
class  FibonacciBadHashWrapper
 
struct  Hash
 
class  Hash_AdlWrapper
 
struct  SeededHash
 
class  SeedGenerator
 
class  SipHashAlgorithm
 
class  SpookyHashAlgorithm
 
class  SpookyHashAlgorithmImp
 
class  WyHashIncrementalAlgorithm
 

Functions

template<class HASH_ALGORITHM , class TYPE >
bsl::enable_if<(bsl::is_integral< TYPE >::value||bsl::is_pointer< TYPE >::value||bsl::is_enum< TYPE >::value)&&!bsl::is_same< TYPE, bool >::value >::type hashAppend (HASH_ALGORITHM &hashAlg, TYPE input)
 
template<class HASH_ALGORITHM , class TYPE >
bsl::enable_if< bsl::is_floating_point< TYPE >::value &&!bsl::is_same< TYPE, longdouble >::value >::type hashAppend (HASH_ALGORITHM &hashAlg, TYPE input)
 
template<class HASH_ALGORITHM , class TYPE >
bsl::enable_if< bsl::is_same< TYPE, bool >::value >::type hashAppend (HASH_ALGORITHM &hashAlg, TYPE input)
 
template<class HASH_ALGORITHM , class TYPE >
bsl::enable_if< bsl::is_same< TYPE, longdouble >::value >::type hashAppend (HASH_ALGORITHM &hashAlg, TYPE input)
 
template<class HASH_ALGORITHM , size_t N>
void hashAppend (HASH_ALGORITHM &hashAlg, char(&input)[N])
 
template<class HASH_ALGORITHM , size_t N>
void hashAppend (HASH_ALGORITHM &hashAlg, const char(&input)[N])
 
template<class HASH_ALGORITHM , class TYPE , size_t N>
void hashAppend (HASH_ALGORITHM &hashAlg, TYPE(&input)[N])
 
template<class HASH_ALGORITHM , class TYPE , size_t N>
void hashAppend (HASH_ALGORITHM &hashAlg, const TYPE(&input)[N])
 
template<class HASH_ALGORITHM , class TYPE1 , class TYPE2 >
void hashAppend (HASH_ALGORITHM &algorithm, const std::pair< TYPE1, TYPE2 > &input)
 
template<class HASHALG , class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE void hashAppend (HASHALG &hashAlg, const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &input)
 

Function Documentation

◆ hashAppend() [1/10]

template<class HASH_ALGORITHM , class TYPE1 , class TYPE2 >
void bslh::hashAppend ( HASH_ALGORITHM &  algorithm,
const std::pair< TYPE1, TYPE2 > &  input 
)
inline

Invoke the (appropriate) hashAppend function, with the specified algorithm on the first and second members, in that order, of the specified input pair.

◆ hashAppend() [2/10]

template<class HASH_ALGORITHM , size_t N>
void bslh::hashAppend ( HASH_ALGORITHM &  hashAlg,
char(&)  input[N] 
)

Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the entire char array will be hashed in only one call to hashAlg. Also note that this hashAppend exists because some platforms don't recognize that adding a const qualifier is a better match for arrays than decaying to a pointer and using the hashAppend function for pointers.

◆ hashAppend() [3/10]

template<class HASH_ALGORITHM , size_t N>
void bslh::hashAppend ( HASH_ALGORITHM &  hashAlg,
const char(&)  input[N] 
)

Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the entire char array will be hashed in only one call to hashAlg.

◆ hashAppend() [4/10]

template<class HASH_ALGORITHM , class TYPE , size_t N>
void bslh::hashAppend ( HASH_ALGORITHM &  hashAlg,
const TYPE(&)  input[N] 
)

Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the elements in input will be hashed one at a time by calling hashAppend because the (template parameter) TYPE might not be hashable as a contiguous sequence of bytes.

◆ hashAppend() [5/10]

template<class HASH_ALGORITHM , class TYPE >
bsl::enable_if<(bsl::is_integral< TYPE >::value||bsl::is_pointer< TYPE >::value||bsl::is_enum< TYPE >::value)&&!bsl::is_same< TYPE, bool >::value >::type bslh::hashAppend ( HASH_ALGORITHM &  hashAlg,
TYPE  input 
)
inline

Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the enable_if meta-function is used to enable this hashAppend function for only integral (excluding bool), pointer, and enum types, because these types can all be hashed as a continuous sequence of bytes. Also note that this function is defined inline because MS Visual Studio compilers before 2013 require (some) functions declared using enable_if be in-place inline.

◆ hashAppend() [6/10]

template<class HASH_ALGORITHM , class TYPE >
bsl::enable_if< bsl::is_floating_point< TYPE >::value &&!bsl::is_same< TYPE, longdouble >::value >::type bslh::hashAppend ( HASH_ALGORITHM &  hashAlg,
TYPE  input 
)
inline

Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the enable_if meta-function is used to enable this hashAppend function for only floating point (excluding long double) types, because these types need to have +/-0.0 normalized to 0.0 before they can be hashed as a continuous sequence of bytes. Also note that this function is defined inline because MS Visual Studio compilers before 2013 require (some) functions declared using enable_if be in-place inline.

◆ hashAppend() [7/10]

template<class HASH_ALGORITHM , class TYPE >
bsl::enable_if< bsl::is_same< TYPE, bool >::value >::type bslh::hashAppend ( HASH_ALGORITHM &  hashAlg,
TYPE  input 
)
inline

Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the enable_if meta-function is used to enable this hashAppend function for only bool, because bools can have multiple true representations and need to be normalized before they can be hashed as a continuous sequence of bytes.

Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the enable_if meta-function is used to enable this hashAppend function for only integral (excluding bool), pointer, and enum types, because these types can all be hashed as a continuous sequence of bytes. Also note that this function is defined inline because MS Visual Studio compilers before 2013 require (some) functions declared using enable_if be in-place inline.

Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the enable_if meta-function is used to enable this hashAppend function for only floating point (excluding long double) types, because these types need to have +/-0.0 normalized to 0.0 before they can be hashed as a continuous sequence of bytes. Also note that this function is defined inline because MS Visual Studio compilers before 2013 require (some) functions declared using enable_if be in-place inline.

◆ hashAppend() [8/10]

template<class HASH_ALGORITHM , class TYPE >
bsl::enable_if< bsl::is_same< TYPE, longdouble >::value >::type bslh::hashAppend ( HASH_ALGORITHM &  hashAlg,
TYPE  input 
)
inline

Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the enable_if meta-function is used to enable this hashAppend function for only long double, because on some compilers long doubles contain garbage and can not be hashed as a continuous sequence of bytes.

Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the enable_if meta-function is used to enable this hashAppend function for only integral (excluding bool), pointer, and enum types, because these types can all be hashed as a continuous sequence of bytes. Also note that this function is defined inline because MS Visual Studio compilers before 2013 require (some) functions declared using enable_if be in-place inline.

Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the enable_if meta-function is used to enable this hashAppend function for only floating point (excluding long double) types, because these types need to have +/-0.0 normalized to 0.0 before they can be hashed as a continuous sequence of bytes. Also note that this function is defined inline because MS Visual Studio compilers before 2013 require (some) functions declared using enable_if be in-place inline.

◆ hashAppend() [9/10]

template<class HASH_ALGORITHM , class TYPE , size_t N>
void bslh::hashAppend ( HASH_ALGORITHM &  hashAlg,
TYPE(&)  input[N] 
)

Passes the specified input into the specified hashAlg to be combined into the internal state of the algorithm which is used to produce the resulting hash value. Note that the elements in input will be hashed one at a time by calling hashAppend because the (template parameter) TYPE might not be hashable as a contiguous sequence of bytes. Also note that this hashAppend exists because some platforms don't recognize that adding a const qualifier is a better match for arrays than decaying to a pointer and using the hashAppend function for pointers.

◆ hashAppend() [10/10]

template<class HASHALG , class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE void bslh::hashAppend ( HASHALG &  hashAlg,
const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  input 
)

Pass the specified input string to the specified hashAlg hashing algorithm of the (template parameter) type HASHALG. Note that this function violates the BDE coding standard, adding a function for a namespace for a different package, and none of the function parameters are from this package either. This is necessary in order to provide an implementation of bslh::hashAppend for the (native) standard library string type as we are not allowed to add overloads directly into namespace std, and this component essentially provides the interface between bsl and std string types.