![]() |
Fabcoin Core
0.16.2
P2P Digital Currency
|
#include <equihash.h>
Public Types | |
| enum | : size_t { IndicesPerHashOutput =512/N } |
| enum | : size_t { HashLen =(N+7)/8 } |
| enum | : size_t { HashOutput =IndicesPerHashOutput*HashLen } |
| enum | : size_t { CollisionBitLength =N/(K+1) } |
| enum | : size_t { CollisionByteLength =(CollisionBitLength+7)/8 } |
| enum | : size_t { HashLength =(K+1)*CollisionByteLength } |
| enum | : size_t { FullWidth =2*CollisionByteLength+sizeof(eh_index)*(1 << (K-1)) } |
| enum | : size_t { FinalFullWidth =2*CollisionByteLength+sizeof(eh_index)*(1 << (K)) } |
| enum | : size_t { TruncatedWidth =max(HashLength+sizeof(eh_trunc), 2*CollisionByteLength+sizeof(eh_trunc)*(1 << (K-1))) } |
| enum | : size_t { FinalTruncatedWidth =max(HashLength+sizeof(eh_trunc), 2*CollisionByteLength+sizeof(eh_trunc)*(1 << (K))) } |
| enum | : size_t { SolutionWidth =(1 << K)*(CollisionBitLength+1)/8 } |
Public Member Functions | |
| Equihash () | |
| int | InitialiseState (eh_HashState &base_state) |
| bool | BasicSolve (const eh_HashState &base_state, const std::function< bool(std::vector< unsigned char >)> validBlock, const std::function< bool(EhSolverCancelCheck)> cancelled) |
| bool | OptimisedSolve (const eh_HashState &base_state, const std::function< bool(std::vector< unsigned char >)> validBlock, const std::function< bool(EhSolverCancelCheck)> cancelled) |
| bool | IsValidSolution (const eh_HashState &base_state, std::vector< unsigned char > soln) |
Private Member Functions | |
| BOOST_STATIC_ASSERT (K< N) | |
| BOOST_STATIC_ASSERT ((N/(K+1))+1< 8 *sizeof(eh_index)) | |
Definition at line 164 of file equihash.h.
| anonymous enum : size_t |
| Enumerator | |
|---|---|
| IndicesPerHashOutput | |
Definition at line 172 of file equihash.h.
| anonymous enum : size_t |
| Enumerator | |
|---|---|
| HashLen | |
Definition at line 173 of file equihash.h.
| anonymous enum : size_t |
| Enumerator | |
|---|---|
| HashOutput | |
Definition at line 174 of file equihash.h.
| anonymous enum : size_t |
| Enumerator | |
|---|---|
| CollisionBitLength | |
Definition at line 175 of file equihash.h.
| anonymous enum : size_t |
| Enumerator | |
|---|---|
| CollisionByteLength | |
Definition at line 176 of file equihash.h.
| anonymous enum : size_t |
| Enumerator | |
|---|---|
| HashLength | |
Definition at line 177 of file equihash.h.
| anonymous enum : size_t |
| Enumerator | |
|---|---|
| FullWidth | |
Definition at line 178 of file equihash.h.
| anonymous enum : size_t |
| Enumerator | |
|---|---|
| FinalFullWidth | |
Definition at line 179 of file equihash.h.
| anonymous enum : size_t |
| Enumerator | |
|---|---|
| TruncatedWidth | |
Definition at line 180 of file equihash.h.
| anonymous enum : size_t |
| Enumerator | |
|---|---|
| FinalTruncatedWidth | |
Definition at line 181 of file equihash.h.
| anonymous enum : size_t |
| Enumerator | |
|---|---|
| SolutionWidth | |
Definition at line 182 of file equihash.h.
Definition at line 184 of file equihash.h.
| template bool Equihash< N, K >::BasicSolve | ( | const eh_HashState & | base_state, |
| const std::function< bool(std::vector< unsigned char >)> | validBlock, | ||
| const std::function< bool(EhSolverCancelCheck)> | cancelled | ||
| ) |
Definition at line 335 of file equihash.cpp.
|
private |
|
private |
| template int Equihash< N, K >::InitialiseState | ( | eh_HashState & | base_state | ) |
Definition at line 35 of file equihash.cpp.
| template bool Equihash< N, K >::IsValidSolution | ( | const eh_HashState & | base_state, |
| std::vector< unsigned char > | soln | ||
| ) |
| template bool Equihash< N, K >::OptimisedSolve | ( | const eh_HashState & | base_state, |
| const std::function< bool(std::vector< unsigned char >)> | validBlock, | ||
| const std::function< bool(EhSolverCancelCheck)> | cancelled | ||
| ) |
Definition at line 507 of file equihash.cpp.
1.8.11