Fabcoin Core
0.16.2
P2P Digital Currency
|
#include "compat/endian.h"
#include "crypto/sha256.h"
#include "utilstrencodings.h"
#include "sodium.h"
#include <cstring>
#include <exception>
#include <functional>
#include <memory>
#include <set>
#include <vector>
#include <boost/static_assert.hpp>
#include "equihash.tcc"
Go to the source code of this file.
Classes | |
class | StepRow< WIDTH > |
class | CompareSR |
class | FullStepRow< WIDTH > |
class | TruncatedStepRow< WIDTH > |
class | EhSolverCancelledException |
class | Equihash< N, K > |
Macros | |
#define | EhInitialiseState(n, k, base_state) |
#define | EhIsValidSolution(n, k, base_state, soln, ret) |
Typedefs | |
typedef crypto_generichash_blake2b_state | eh_HashState |
typedef uint32_t | eh_index |
typedef uint8_t | eh_trunc |
Enumerations | |
enum | EhSolverCancelCheck { ListGeneration, ListSorting, ListColliding, RoundEnd, FinalSorting, FinalColliding, PartialGeneration, PartialSorting, PartialSubtreeEnd, PartialIndexEnd, PartialEnd } |
Functions | |
void | ExpandArray (const unsigned char *in, size_t in_len, unsigned char *out, size_t out_len, size_t bit_len, size_t byte_pad=0) |
void | CompressArray (const unsigned char *in, size_t in_len, unsigned char *out, size_t out_len, size_t bit_len, size_t byte_pad=0) |
eh_index | ArrayToEhIndex (const unsigned char *array) |
eh_trunc | TruncateIndex (const eh_index i, const unsigned int ilen) |
std::vector< eh_index > | GetIndicesFromMinimal (std::vector< unsigned char > minimal, size_t cBitLen) |
std::vector< unsigned char > | GetMinimalFromIndices (std::vector< eh_index > indices, size_t cBitLen) |
template<size_t WIDTH> | |
bool | HasCollision (StepRow< WIDTH > &a, StepRow< WIDTH > &b, size_t l) |
constexpr size_t | max (const size_t A, const size_t B) |
constexpr size_t | equihash_solution_size (unsigned int N, unsigned int K) |
bool | EhBasicSolve (unsigned int n, unsigned int k, const eh_HashState &base_state, const std::function< bool(std::vector< unsigned char >)> validBlock, const std::function< bool(EhSolverCancelCheck)> cancelled) |
bool | EhBasicSolveUncancellable (unsigned int n, unsigned int k, const eh_HashState &base_state, const std::function< bool(std::vector< unsigned char >)> validBlock) |
bool | EhOptimisedSolve (unsigned int n, unsigned int k, const eh_HashState &base_state, const std::function< bool(std::vector< unsigned char >)> validBlock, const std::function< bool(EhSolverCancelCheck)> cancelled) |
bool | EhOptimisedSolveUncancellable (unsigned int n, unsigned int k, const eh_HashState &base_state, const std::function< bool(std::vector< unsigned char >)> validBlock) |
#define EhInitialiseState | ( | n, | |
k, | |||
base_state | |||
) |
Definition at line 204 of file equihash.h.
#define EhIsValidSolution | ( | n, | |
k, | |||
base_state, | |||
soln, | |||
ret | |||
) |
Definition at line 271 of file equihash.h.
typedef crypto_generichash_blake2b_state eh_HashState |
Definition at line 24 of file equihash.h.
typedef uint32_t eh_index |
Definition at line 25 of file equihash.h.
typedef uint8_t eh_trunc |
Definition at line 26 of file equihash.h.
enum EhSolverCancelCheck |
Enumerator | |
---|---|
ListGeneration | |
ListSorting | |
ListColliding | |
RoundEnd | |
FinalSorting | |
FinalColliding | |
PartialGeneration | |
PartialSorting | |
PartialSubtreeEnd | |
PartialIndexEnd | |
PartialEnd |
Definition at line 135 of file equihash.h.
eh_index ArrayToEhIndex | ( | const unsigned char * | array | ) |
Definition at line 158 of file equihash.cpp.
void CompressArray | ( | const unsigned char * | in, |
size_t | in_len, | ||
unsigned char * | out, | ||
size_t | out_len, | ||
size_t | bit_len, | ||
size_t | byte_pad = 0 |
||
) |
Definition at line 108 of file equihash.cpp.
|
inline |
Definition at line 219 of file equihash.h.
|
inline |
Definition at line 238 of file equihash.h.
|
inline |
Definition at line 245 of file equihash.h.
|
inline |
|
inline |
void ExpandArray | ( | const unsigned char * | in, |
size_t | in_len, | ||
unsigned char * | out, | ||
size_t | out_len, | ||
size_t | bit_len, | ||
size_t | byte_pad = 0 |
||
) |
std::vector<eh_index> GetIndicesFromMinimal | ( | std::vector< unsigned char > | minimal, |
size_t | cBitLen | ||
) |
Definition at line 179 of file equihash.cpp.
std::vector<unsigned char> GetMinimalFromIndices | ( | std::vector< eh_index > | indices, |
size_t | cBitLen | ||
) |
Definition at line 195 of file equihash.cpp.
Definition at line 283 of file equihash.cpp.
|
inline |
Definition at line 157 of file equihash.h.