Bitcoin ABC 0.30.7
P2P Digital Currency
|
SipHash-2-4. More...
#include <siphash.h>
Public Member Functions | |
CSipHasher (uint64_t k0, uint64_t k1) | |
Construct a SipHash calculator initialized with 128-bit key (k0, k1) More... | |
CSipHasher & | Write (uint64_t data) |
Hash a 64-bit integer worth of data. More... | |
CSipHasher & | Write (const uint8_t *data, size_t size) |
Hash arbitrary bytes. More... | |
uint64_t | Finalize () const |
Compute the 64-bit SipHash-2-4 of the data written so far. More... | |
Private Attributes | |
uint64_t | v [4] |
uint64_t | tmp |
uint8_t | count |
CSipHasher::CSipHasher | ( | uint64_t | k0, |
uint64_t | k1 | ||
) |
Construct a SipHash calculator initialized with 128-bit key (k0, k1)
Definition at line 27 of file siphash.cpp.
uint64_t CSipHasher::Finalize | ( | ) | const |
Compute the 64-bit SipHash-2-4 of the data written so far.
The object remains untouched.
Definition at line 82 of file siphash.cpp.
CSipHasher & CSipHasher::Write | ( | const uint8_t * | data, |
size_t | size | ||
) |
Hash arbitrary bytes.
Definition at line 55 of file siphash.cpp.
CSipHasher & CSipHasher::Write | ( | uint64_t | data | ) |
Hash a 64-bit integer worth of data.
It is treated as if this was the little-endian interpretation of 8 bytes. This function can only be used when a multiple of 8 bytes have been written so far.
Definition at line 36 of file siphash.cpp.