![]() |
Bitcoin Core 30.99.0
P2P Digital Currency
|
Optimized SipHash-2-4 implementation for uint256. More...
#include <siphash.h>
Public Member Functions | |
| PresaltedSipHasher (uint64_t k0, uint64_t k1) noexcept | |
| uint64_t | operator() (const uint256 &val) const noexcept |
| Equivalent to CSipHasher(k0, k1).Write(val).Finalize(). More... | |
| uint64_t | operator() (const uint256 &val, uint32_t extra) const noexcept |
Equivalent to CSipHasher(k0, k1).Write(val).Write(extra).Finalize(), with extra encoded as 4 little-endian bytes. More... | |
Private Attributes | |
| const SipHashState | m_state |
Optimized SipHash-2-4 implementation for uint256.
This class caches the initial SipHash v[0..3] state derived from (k0, k1) and implements a specialized hashing path for uint256 values, with or without an extra 32-bit word. The internal state is immutable, so PresaltedSipHasher instances can be reused for multiple hashes with the same key.
|
inlineexplicitnoexcept |
|
noexcept |
Equivalent to CSipHasher(k0, k1).Write(val).Finalize().
Definition at line 91 of file siphash.cpp.
|
noexcept |
Equivalent to CSipHasher(k0, k1).Write(val).Write(extra).Finalize(), with extra encoded as 4 little-endian bytes.
Specialized implementation for efficiency.
Definition at line 128 of file siphash.cpp.
|
private |