Offline Transaction Signing (OTS) 0.1.0
Loading...
Searching...
No Matches
entropy.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <cstddef>
5
10namespace ots {
18 class Entropy {
19 public:
26 static bool allBytesIdentical(const uint8_t* data, size_t size) noexcept;
27
34 static bool isIncrementalSequence(const uint8_t* data, size_t size) noexcept;
35
42 static bool hasRepeatingSubpattern(const uint8_t* data, size_t size, uint8_t pattern) noexcept;
43
49 static double shannonEntropy(const uint8_t* data, size_t size) noexcept;
50
55 static bool mostlyExtremes(const uint8_t* data, size_t size) noexcept;
56 };
57} // namespace ots
Entropy check functions.
Definition entropy.hpp:18
static bool isIncrementalSequence(const uint8_t *data, size_t size) noexcept
Check if bytes are an incremental sequence @data the data to check @size the size of the data.
Definition entropy.cpp:20
static double shannonEntropy(const uint8_t *data, size_t size) noexcept
Check the Shannon entropy index of the data.
Definition entropy.cpp:36
static bool allBytesIdentical(const uint8_t *data, size_t size) noexcept
Check if all bytes are identical @data the data to check @size the size of the data.
Definition entropy.cpp:10
static bool hasRepeatingSubpattern(const uint8_t *data, size_t size, uint8_t pattern) noexcept
Check if bytes have a repeating subpattern @data the data to check @size the size of the data.
Definition entropy.cpp:29
static bool mostlyExtremes(const uint8_t *data, size_t size) noexcept
Check if the data is mostly extremes.
Definition entropy.cpp:50
The library exists complete only in this namespace.
Definition account.hpp:39