Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
CSipHasher Class Reference

SipHash-2-4. More...

#include <hash.h>

Public Member Functions

 CSipHasher (uint64_t k0, uint64_t k1)
 Construct a SipHash calculator initialized with 128-bit key (k0, k1) More...
 
CSipHasherWrite (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. More...
 
CSipHasherWrite (const unsigned char *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
 
int count
 

Detailed Description

SipHash-2-4.

Definition at line 212 of file hash.h.

Constructor & Destructor Documentation

CSipHasher::CSipHasher ( uint64_t  k0,
uint64_t  k1 
)

Construct a SipHash calculator initialized with 128-bit key (k0, k1)

Definition at line 93 of file hash.cpp.

Member Function Documentation

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 151 of file hash.cpp.

Here is the caller graph for this function:

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 103 of file hash.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

CSipHasher & CSipHasher::Write ( const unsigned char *  data,
size_t  size 
)

Hash arbitrary bytes.

Definition at line 123 of file hash.cpp.

Member Data Documentation

int CSipHasher::count
private

Definition at line 217 of file hash.h.

uint64_t CSipHasher::tmp
private

Definition at line 216 of file hash.h.

uint64_t CSipHasher::v[4]
private

Definition at line 215 of file hash.h.


The documentation for this class was generated from the following files: