Various utilities.
More...
|
ByteArray | convertUint8VectorToByteArray (const std::vector< uint8_t > &input) |
| Convert a vector of uint8_t to ByteArray.
|
|
std::vector< uint8_t > | convertByteArrayToUint8Vector (ByteSpan input) |
| Convert a Byte Span to vector of uint8_t.
|
|
template<typename T > |
T | convertFromByteArray (ByteSpan input) |
|
template<typename T > |
ByteArray | convertToByteArray (const T &input) |
|
std::string | bytesToStr (ByteSpan input) |
|
ByteArray | strToBytes (std::string_view input) |
|
std::string | bytesToHex (ByteSpan input, bool uppercase=false) |
|
ByteArray | hexToBytes (const std::string &input) |
|
◆ CurveInterpolation
Interpolation mode between points.
Enumerator |
---|
DIRECT | No interpolation, directly switch to this value.
|
HOLD_LAST | Hold last value.
|
LINEAR | Do a linear interpolation between last value and this one.
|
◆ bytesToHex()
std::string oe::util::bytesToHex |
( |
ByteSpan |
input, |
|
|
bool |
uppercase = false |
|
) |
| |
Convert byte data to an hexadecimal representation (e.g. to display hash functions results)
◆ bytesToStr()
std::string oe::util::bytesToStr |
( |
ByteSpan |
input | ) |
|
|
inline |
Convert byte data to string (note: might produce garbage characters when used with non-ASCII data)
◆ convertByteArrayToUint8Vector()
std::vector< uint8_t > oe::util::convertByteArrayToUint8Vector |
( |
ByteSpan |
input | ) |
|
|
inline |
Convert a Byte Span to vector of uint8_t.
- Note
- Mainly used to interact with pre-C++17 libraries
◆ convertUint8VectorToByteArray()
ByteArray oe::util::convertUint8VectorToByteArray |
( |
const std::vector< uint8_t > & |
input | ) |
|
|
inline |
Convert a vector of uint8_t to ByteArray.
- Note
- Mainly used to interact with pre-C++17 libraries
◆ hexToBytes()
ByteArray oe::util::hexToBytes |
( |
const std::string & |
input | ) |
|
Convert an hexadecimal representation to byte data
◆ strToBytes()
ByteArray oe::util::strToBytes |
( |
std::string_view |
input | ) |
|
|
inline |
Convert string to byte data