Entropy check functions.
More...
#include <entropy.hpp>
|
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.
|
|
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.
|
|
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.
|
|
static double | shannonEntropy (const uint8_t *data, size_t size) noexcept |
| Check the Shannon entropy index of the data.
|
|
static bool | mostlyExtremes (const uint8_t *data, size_t size) noexcept |
| Check if the data is mostly extremes.
|
|
◆ allBytesIdentical()
bool ots::Entropy::allBytesIdentical |
( |
const uint8_t * |
data, |
|
|
size_t |
size |
|
) |
| |
|
staticnoexcept |
Check if all bytes are identical @data the data to check @size the size of the data.
- Returns
- true if all bytes are identical
◆ hasRepeatingSubpattern()
bool ots::Entropy::hasRepeatingSubpattern |
( |
const uint8_t * |
data, |
|
|
size_t |
size, |
|
|
uint8_t |
pattern |
|
) |
| |
|
staticnoexcept |
Check if bytes have a repeating subpattern @data the data to check @size the size of the data.
- Returns
- true if the data has a repeating subpattern
◆ isIncrementalSequence()
bool ots::Entropy::isIncrementalSequence |
( |
const uint8_t * |
data, |
|
|
size_t |
size |
|
) |
| |
|
staticnoexcept |
Check if bytes are an incremental sequence @data the data to check @size the size of the data.
- Returns
- true if the data is an incremental sequence
◆ mostlyExtremes()
bool ots::Entropy::mostlyExtremes |
( |
const uint8_t * |
data, |
|
|
size_t |
size |
|
) |
| |
|
staticnoexcept |
Check if the data is mostly extremes.
- Note
- The data is mostly 0x00 or 0xFF
◆ shannonEntropy()
double ots::Entropy::shannonEntropy |
( |
const uint8_t * |
data, |
|
|
size_t |
size |
|
) |
| |
|
staticnoexcept |
The documentation for this class was generated from the following files: