Add fromHex() static function to ByteArray

This commit is contained in:
2022-08-27 15:40:32 +02:00
parent 7f5b787cb9
commit 7084fb7025
2 changed files with 50 additions and 1 deletions

View File

@@ -104,6 +104,13 @@ namespace gourou
*/
std::string toBase64();
/**
* @brief Convert hex string into bytes
*
* @param str Hex string
*/
static ByteArray fromHex(const std::string& str);
/**
* @brief Return a string with human readable hex encoded internal data
*/
@@ -130,7 +137,7 @@ namespace gourou
void append(const std::string& str);
/**
* @brief Get internal data. Must bot be freed
* @brief Get internal data. Must not be freed
*/
unsigned char* data() {return _data;}