diff options
author | bunnei <bunneidev@gmail.com> | 2018-10-08 12:30:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-08 12:30:33 -0400 |
commit | 6b48ba52712e5ea9cadb1177c06cb3ca65492c38 (patch) | |
tree | 365bb902d31fd5d5d585fc2f5d9e9dac274b02ec /src/common/hex_util.h | |
parent | fd891ee9c0342b603574e57ef178620439927256 (diff) | |
parent | 110d5784702282c594fe57f84f8d6bda21a82d50 (diff) |
Merge pull request #1424 from DarkLordZach/ips-witch
ips_layer: Add support for IPSwitch executable patches
Diffstat (limited to 'src/common/hex_util.h')
-rw-r--r-- | src/common/hex_util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/hex_util.h b/src/common/hex_util.h index 863a5ccd9..68f003cb6 100644 --- a/src/common/hex_util.h +++ b/src/common/hex_util.h @@ -7,6 +7,7 @@ #include <array> #include <cstddef> #include <string> +#include <vector> #include <fmt/format.h> #include "common/common_types.h" @@ -14,6 +15,8 @@ namespace Common { u8 ToHexNibble(char c1); +std::vector<u8> HexStringToVector(std::string_view str, bool little_endian); + template <std::size_t Size, bool le = false> std::array<u8, Size> HexStringToArray(std::string_view str) { std::array<u8, Size> out{}; @@ -27,6 +30,8 @@ std::array<u8, Size> HexStringToArray(std::string_view str) { return out; } +std::string HexVectorToString(const std::vector<u8>& vector, bool upper = true); + template <std::size_t Size> std::string HexArrayToString(std::array<u8, Size> array, bool upper = true) { std::string out; |