Bitcoin
Public Member Functions | Private Attributes | List of all members
CSipHasher Class Reference

#include <siphash.h>

Public Member Functions

 CSipHasher (uint64_t k0, uint64_t k1)
 
CSipHasherWrite (uint64_t data)
 
CSipHasherWrite (const unsigned char *data, size_t size)
 
uint64_t Finalize () const
 

Private Attributes

uint64_t v [4]
 
uint64_t tmp
 
int count
 

Detailed Description

SipHash-2-4

Constructor & Destructor Documentation

◆ CSipHasher()

CSipHasher::CSipHasher ( uint64_t  k0,
uint64_t  k1 
)

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

Member Function Documentation

◆ Finalize()

uint64_t CSipHasher::Finalize ( ) const

Compute the 64-bit SipHash-2-4 of the data written so far. The object remains untouched.

◆ Write() [1/2]

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.

◆ Write() [2/2]

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

Hash arbitrary bytes.

Member Data Documentation

◆ count

int CSipHasher::count
private

◆ tmp

uint64_t CSipHasher::tmp
private

◆ v

uint64_t CSipHasher::v[4]
private

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