Template for Hashfunctions from 32-bit hash functions. More...
#include <hash-function.h>
Public Member Functions | |
Hash32 (Hash32Function_ptr hp) | |
void | clear () |
Restore initial state. More... | |
uint32_t | GetHash32 (const char *buffer, const size_t size) |
Compute 32-bit hash of a byte buffer. More... | |
![]() | |
Implementation () | |
Constructor. More... | |
virtual | ~Implementation () |
Destructor. More... | |
virtual uint64_t | GetHash64 (const char *buffer, const size_t size) |
Compute 64-bit hash of a byte buffer. More... | |
![]() | |
SimpleRefCount () | |
Constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
Private Attributes | |
Hash32Function_ptr | m_fp |
Additional Inherited Members | |
![]() | |
static void | Cleanup (void) |
Noop. More... | |
Template for Hashfunctions from 32-bit hash functions.
Definition at line 119 of file hash-function.h.
|
inline |
Definition at line 122 of file hash-function.h.
|
inlinevirtual |
Restore initial state.
Implements ns3::Hash::Implementation.
Definition at line 127 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 123 of file hash-function.h.
References m_fp.
|
private |
Definition at line 127 of file hash-function.h.
Referenced by GetHash32().