* Hexdecodes a string * @param hex the hexencoded string * @return the hexdecoded string */
| 381 | * @return the hexdecoded string |
| 382 | */ |
| 383 | inline static std::string from_hex(const std::string& hex) { |
| 384 | auto data = from_hex(hex.data(), hex.length()); |
| 385 | return std::string(reinterpret_cast<char*>(data.data()), data.size()); |
| 386 | } |
| 387 | |
| 388 | /** |
| 389 | * Hexencodes bytes and writes the result to hex |