Raven Core
3.0.0
P2P Digital Currency
|
#include <iostream>
#include <chrono>
#include "crypto/ripemd160.h"
#include "crypto/sha256.h"
#include "prevector.h"
#include "serialize.h"
#include "uint256.h"
#include "version.h"
#include "crypto/sph_blake.h"
#include "crypto/sph_bmw.h"
#include "crypto/sph_groestl.h"
#include "crypto/sph_jh.h"
#include "crypto/sph_keccak.h"
#include "crypto/sph_skein.h"
#include "crypto/sph_luffa.h"
#include "crypto/sph_cubehash.h"
#include "crypto/sph_shavite.h"
#include "crypto/sph_simd.h"
#include "crypto/sph_echo.h"
#include "crypto/sph_hamsi.h"
#include "crypto/sph_fugue.h"
#include "crypto/sph_shabal.h"
#include "crypto/sph_whirlpool.h"
#include "crypto/sph_sha2.h"
#include <vector>
Go to the source code of this file.
Classes | |
class | CHash256 |
A hasher class for Raven's 256-bit hash (double SHA-256). More... | |
class | CHash160 |
A hasher class for Raven's 160-bit hash (SHA-256 + RIPEMD-160). More... | |
class | CHashWriter |
A writer stream (for serialization) that computes a 256-bit hash. More... | |
class | CHashVerifier< Source > |
Reads data from an underlying stream, while hashing the read data. More... | |
class | CSipHasher |
SipHash-2-4. More... | |
Macros | |
#define | GLOBAL extern |
#define | fillz() |
#define | ZBLAKE (memcpy(&ctx_blake, &z_blake, sizeof(z_blake))) |
#define | ZBMW (memcpy(&ctx_bmw, &z_bmw, sizeof(z_bmw))) |
#define | ZGROESTL (memcpy(&ctx_groestl, &z_groestl, sizeof(z_groestl))) |
#define | ZJH (memcpy(&ctx_jh, &z_jh, sizeof(z_jh))) |
#define | ZKECCAK (memcpy(&ctx_keccak, &z_keccak, sizeof(z_keccak))) |
#define | ZSKEIN (memcpy(&ctx_skein, &z_skein, sizeof(z_skein))) |
#define | START_OF_LAST_16_NIBBLES_OF_HASH 48 |
Typedefs | |
typedef uint256 | ChainCode |
Functions | |
template<typename T1 > | |
uint256 | Hash (const T1 pbegin, const T1 pend) |
Compute the 256-bit hash of an object. More... | |
template<typename T1 , typename T2 > | |
uint256 | Hash (const T1 p1begin, const T1 p1end, const T2 p2begin, const T2 p2end) |
Compute the 256-bit hash of the concatenation of two objects. More... | |
template<typename T1 , typename T2 , typename T3 > | |
uint256 | Hash (const T1 p1begin, const T1 p1end, const T2 p2begin, const T2 p2end, const T3 p3begin, const T3 p3end) |
template<typename T1 , typename T2 , typename T3 , typename T4 > | |
uint256 | Hash (const T1 p1begin, const T1 p1end, const T2 p2begin, const T2 p2end, const T3 p3begin, const T3 p3end, const T4 p4begin, const T4 p4end) |
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > | |
uint256 | Hash (const T1 p1begin, const T1 p1end, const T2 p2begin, const T2 p2end, const T3 p3begin, const T3 p3end, const T4 p4begin, const T4 p4end, const T5 p5begin, const T5 p5end) |
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > | |
uint256 | Hash (const T1 p1begin, const T1 p1end, const T2 p2begin, const T2 p2end, const T3 p3begin, const T3 p3end, const T4 p4begin, const T4 p4end, const T5 p5begin, const T5 p5end, const T6 p6begin, const T6 p6end) |
template<typename T1 > | |
uint160 | Hash160 (const T1 pbegin, const T1 pend) |
Compute the 160-bit hash an object. More... | |
uint160 | Hash160 (const std::vector< unsigned char > &vch) |
Compute the 160-bit hash of a vector. More... | |
template<unsigned int N> | |
uint160 | Hash160 (const prevector< N, unsigned char > &vch) |
Compute the 160-bit hash of a vector. More... | |
template<typename T > | |
uint256 | SerializeHash (const T &obj, int nType=SER_GETHASH, int nVersion=PROTOCOL_VERSION) |
Compute the 256-bit hash of an object's serialization. More... | |
unsigned int | MurmurHash3 (unsigned int nHashSeed, const std::vector< unsigned char > &vDataToHash) |
void | BIP32Hash (const ChainCode &chainCode, unsigned int nChild, unsigned char header, const unsigned char data[32], unsigned char output[64]) |
uint64_t | SipHashUint256 (uint64_t k0, uint64_t k1, const uint256 &val) |
Optimized SipHash-2-4 implementation for uint256. More... | |
uint64_t | SipHashUint256Extra (uint64_t k0, uint64_t k1, const uint256 &val, uint32_t extra) |
int | GetHashSelection (const uint256 PrevBlockHash, int index) |
template<typename T1 > | |
uint256 | HashX16R (const T1 pbegin, const T1 pend, const uint256 PrevBlockHash) |
Variables | |
GLOBAL sph_blake512_context | z_blake |
GLOBAL sph_bmw512_context | z_bmw |
GLOBAL sph_groestl512_context | z_groestl |
GLOBAL sph_jh512_context | z_jh |
GLOBAL sph_keccak512_context | z_keccak |
GLOBAL sph_skein512_context | z_skein |
GLOBAL sph_luffa512_context | z_luffa |
GLOBAL sph_cubehash512_context | z_cubehash |
GLOBAL sph_shavite512_context | z_shavite |
GLOBAL sph_simd512_context | z_simd |
GLOBAL sph_echo512_context | z_echo |
double | algoHashTotal [16] |
int | algoHashHits [16] |
#define fillz | ( | ) |
#define START_OF_LAST_16_NIBBLES_OF_HASH 48 |
void BIP32Hash | ( | const ChainCode & | chainCode, |
unsigned int | nChild, | ||
unsigned char | header, | ||
const unsigned char | data[32], | ||
unsigned char | output[64] | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
unsigned int MurmurHash3 | ( | unsigned int | nHashSeed, |
const std::vector< unsigned char > & | vDataToHash | ||
) |
uint256 SerializeHash | ( | const T & | obj, |
int | nType = SER_GETHASH , |
||
int | nVersion = PROTOCOL_VERSION |
||
) |
uint64_t SipHashUint256 | ( | uint64_t | k0, |
uint64_t | k1, | ||
const uint256 & | val | ||
) |
Optimized SipHash-2-4 implementation for uint256.
It is identical to: SipHasher(k0, k1) .Write(val.GetUint64(0)) .Write(val.GetUint64(1)) .Write(val.GetUint64(2)) .Write(val.GetUint64(3)) .Finalize()
Definition at line 173 of file hash.cpp.
uint64_t SipHashUint256Extra | ( | uint64_t | k0, |
uint64_t | k1, | ||
const uint256 & | val, | ||
uint32_t | extra | ||
) |
GLOBAL sph_cubehash512_context z_cubehash |
GLOBAL sph_echo512_context z_echo |
GLOBAL sph_groestl512_context z_groestl |
GLOBAL sph_jh512_context z_jh |
GLOBAL sph_keccak512_context z_keccak |
GLOBAL sph_luffa512_context z_luffa |
GLOBAL sph_shavite512_context z_shavite |
GLOBAL sph_simd512_context z_simd |