OpenCBDC Transaction Processor
Loading...
Searching...
No Matches
cbdc::hashing::const_sip_hash< T > Struct Template Reference

SipHash function to generate STL data structure hash keys for system IDs. More...

#include <hashmap.hpp>

Inheritance diagram for cbdc::hashing::const_sip_hash< T >:

Public Member Functions

auto operator() (T const &tx) const noexcept -> size_t
 

Detailed Description

template<class T>
struct cbdc::hashing::const_sip_hash< T >

SipHash function to generate STL data structure hash keys for system IDs.

[TODO: Uses randomly generated initialization keys to insure that colliding values will differ from run to run.] For transaction data that comes from users, it is important to key data in sets and hashmaps non-deterministically. Otherwise, malicious actors might pre-calculate colliding values and spam the system with them to cripple performance.

Template Parameters
Thash-like type to hash.

Definition at line 27 of file hashmap.hpp.

Member Function Documentation

◆ operator()()

template<class T >
auto cbdc::hashing::const_sip_hash< T >::operator() ( T const & tx) const -> size_t
inlinenoexcept

Definition at line 29 of file hashmap.hpp.


The documentation for this struct was generated from the following file: