Template for Hashfunctions from 64-bit hash functions. More...
#include <hash-function.h>
Public Member Functions | |
Hash64 (Hash64Function_ptr hp) | |
void | clear () |
uint32_t | GetHash32 (const char *buffer, const size_t size) |
uint64_t | GetHash64 (const char *buffer, const size_t size) |
![]() | |
Implementation () | |
virtual | ~Implementation () |
![]() | |
SimpleRefCount () | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
Private Attributes | |
Hash64Function_ptr | m_fp |
Additional Inherited Members | |
![]() | |
static void | Cleanup (void) |
Template for Hashfunctions from 64-bit hash functions.
Definition at line 137 of file hash-function.h.
|
inline |
Definition at line 140 of file hash-function.h.
|
inlinevirtual |
Restore initial state
Implements ns3::Hash::Implementation.
Definition at line 153 of file hash-function.h.
|
inlinevirtual |
Compute 32-bit hash of a byte buffer
Call clear () between calls to GetHash32() to reset the internal state and hash each buffer separately.
If you don't call clear() between calls to GetHash32, you can hash successive buffers. The final return value will be the cumulative hash across all calls.
[in] | buffer | pointer to the beginning of the buffer |
[in] | size | length of the buffer, in bytes |
Implements ns3::Hash::Implementation.
Definition at line 145 of file hash-function.h.
References GetHash64().
|
inlinevirtual |
Compute 64-bit hash of a byte buffer.
Default implementation returns 32-bit hash, with a warning.
Call clear () between calls to GetHash64() to reset the internal state and hash each buffer separately.
If you don't call clear() between calls to GetHash64, you can hash successive buffers. The final return value will be the cumulative hash across all calls.
[in] | buffer | pointer to the beginning of the buffer |
[in] | size | length of the buffer, in bytes |
Reimplemented from ns3::Hash::Implementation.
Definition at line 141 of file hash-function.h.
References m_fp.
Referenced by GetHash32().
|
private |
Definition at line 153 of file hash-function.h.
Referenced by GetHash64().