47 data = ConsumeRandomLengthByteVector(fuzzed_data_provider);
49 auto new_size = fuzzed_data_provider.ConsumeIntegralInRange<size_t>(1, 4096);
50 auto x = fuzzed_data_provider.ConsumeIntegral<uint8_t>();
51 data.resize(new_size, x);
60 (
void)
sha1.Write(data.data(), data.size());
104 sha1.Finalize(data.data());
108 sha256.Finalize(data.data());
112 sha512.Finalize(data.data());
126 for (
size_t i = 0; i < 25; ++i) {
A hasher class for HMAC-SHA-256.
static const size_t OUTPUT_SIZE
A hasher class for HMAC-SHA-512.
static const size_t OUTPUT_SIZE
A hasher class for Bitcoin's 160-bit hash (SHA-256 + RIPEMD-160).
static const size_t OUTPUT_SIZE
CHash160 & Write(std::span< const unsigned char > input)
void Finalize(std::span< unsigned char > output)
A hasher class for Bitcoin's 256-bit hash (double SHA-256).
static const size_t OUTPUT_SIZE
void Finalize(std::span< unsigned char > output)
CHash256 & Write(std::span< const unsigned char > input)
A hasher class for RIPEMD-160.
static const size_t OUTPUT_SIZE
static const size_t OUTPUT_SIZE
A hasher class for SHA-256.
static const size_t OUTPUT_SIZE
A hasher class for SHA-512.
static constexpr size_t OUTPUT_SIZE
General SipHash-2-4 implementation.
T ConsumeIntegralInRange(T min, T max)
static constexpr size_t OUTPUT_SIZE
#define LIMITED_WHILE(condition, limit)
Can be used to limit a theoretically unbounded loop.
uint160 Hash160(const T1 &in1)
Compute the 160-bit hash an object.
uint256 Hash(const T &in1)
Compute the 256-bit hash of an object.
Internal RIPEMD-160 implementation.
Internal SHA-1 implementation.
Internal SHA-256 implementation.
Internal SHA-512 implementation.
void KeccakF(uint64_t(&st)[25])
The Keccak-f[1600] transform.
size_t CallOneOf(FuzzedDataProvider &fuzzed_data_provider, Callables... callables)
std::vector< B > ConsumeRandomLengthByteVector(FuzzedDataProvider &fuzzed_data_provider, const std::optional< size_t > &max_length=std::nullopt) noexcept
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.
FuzzedDataProvider & fuzzed_data_provider