Bitcoin
siphash.h
Go to the documentation of this file.
1 // Copyright (c) 2016-2018 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef BITCOIN_CRYPTO_SIPHASH_H
6 #define BITCOIN_CRYPTO_SIPHASH_H
7 
8 #include <stdint.h>
9 
10 #include <uint256.h>
11 
14 {
15 private:
16  uint64_t v[4];
18  int count;
19 
20 public:
29  CSipHasher& Write(const unsigned char* data, size_t size);
31  uint64_t Finalize() const;
32 };
33 
46 
47 #endif // BITCOIN_CRYPTO_SIPHASH_H
Definition: siphash.h:13
uint64_t SipHashUint256(uint64_t k0, uint64_t k1, const uint256 &val)
Definition: siphash.cpp:94
uint64_t v[4]
Definition: siphash.h:16
uint64_t Finalize() const
Definition: siphash.cpp:76
int count
Definition: siphash.h:18
unsigned int uint32_t
Definition: stdint.h:21
unsigned long long uint64_t
Definition: stdint.h:22
static const unsigned char k1[32]
Definition: chacha_poly_aead.cpp:20
uint64_t tmp
Definition: siphash.h:17
std::vector< uint8_t > data
Definition: bech32.cpp:10
Definition: uint256.h:121
CSipHasher & Write(uint64_t data)
Definition: siphash.cpp:28
CSipHasher(uint64_t k0, uint64_t k1)
Definition: siphash.cpp:18
uint64_t SipHashUint256Extra(uint64_t k0, uint64_t k1, const uint256 &val, uint32_t extra)
Definition: siphash.cpp:134