aboutsummaryrefslogtreecommitdiff
path: root/src/common/Utilities/Util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/Utilities/Util.h')
-rw-r--r--src/common/Utilities/Util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h
index 18a380ea9b4..a7f6619838a 100644
--- a/src/common/Utilities/Util.h
+++ b/src/common/Utilities/Util.h
@@ -365,6 +365,15 @@ std::array<uint8, Size> HexStrToByteArray(std::string const& str, bool reverse =
return arr;
}
+inline std::vector<uint8> HexStrToByteVector(std::string const& str, bool reverse = false)
+{
+ std::vector<uint8> buf;
+ size_t const sz = (str.size() / 2);
+ buf.resize(sz);
+ Trinity::Impl::HexStrToByteArray(str, buf.data(), sz, reverse);
+ return buf;
+}
+
TC_COMMON_API bool StringToBool(std::string const& str);
TC_COMMON_API float DegToRad(float degrees);