![]() |
Bitcoin Core 32.99.0
P2P Digital Currency
|
A custom weaker variant of SipHash-1-3 without padding, and supporting "jumbo" inputs. More...
#include <siphash.h>
Public Member Functions | |
| SipHasher13UJ (uint64_t k0, uint64_t k1) noexcept | |
| Construct a SipHash-1-3-UJ calculator initialized with 128-bit key (k0, k1). | |
| SipHasher13UJ & | Write (uint64_t data) noexcept |
| Hash a normal 64-bit value. | |
| SipHasher13UJ & | WriteJumbo (const uint256 &hash) noexcept |
| Hash a 256-bit value as a jumbo block. | |
| uint64_t | Finalize () const noexcept |
| Compute the 64-bit SipHash-1-3-UJ of the data written so far. | |
| ALWAYS_INLINE uint64_t | Hash (const uint256 &hash) const noexcept |
| Hash a jumbo block after the data written so far and finalize without modifying the object. | |
| ALWAYS_INLINE uint64_t | Hash (const uint256 &hash, uint64_t extra) const noexcept |
| Hash a jumbo block followed by a normal block after the data written so far, and finalize without modifying the object. | |
Private Attributes | |
| SipHashState | m_state |
A custom weaker variant of SipHash-1-3 without padding, and supporting "jumbo" inputs.
Compared to the traditional SipHash-2-4, this incorporates 3 changes:
Other components are unchanged: initialization constants, SipRound, and 64-bit output. This interface serves as an executable specification for fixed-width implementations. The Hash overloads optimize fixed-width inputs without modifying the accumulated state.
|
noexcept |
Compute the 64-bit SipHash-1-3-UJ of the data written so far.
The object remains untouched.
Definition at line 64 of file siphash.cpp.
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
Hash a normal 64-bit value.
Definition at line 52 of file siphash.cpp.
|
noexcept |
Hash a 256-bit value as a jumbo block.
For hash-table use, non-hash inputs must remain few and bounded.
Definition at line 58 of file siphash.cpp.
|
private |