add hex conv

This commit is contained in:
2024-01-13 22:31:20 +01:00
parent 2b20c2d2a4
commit fa0a09df87
3 changed files with 66 additions and 0 deletions

10
solanaceae/util/utils.hpp Normal file
View File

@@ -0,0 +1,10 @@
#pragma once
#include <string>
#include <string_view>
#include <vector>
[[nodiscard]] std::vector<uint8_t> hex2bin(const std::string& str);
[[nodiscard]] std::vector<uint8_t> hex2bin(const std::string_view str);
[[nodiscard]] std::string bin2hex(const std::vector<uint8_t>& bin);