refactor: use vector<uint8_t> for keys

This commit is contained in:
sithlord48
2025-01-28 21:15:50 -05:00
committed by Nick Bolton
parent a98f2d745e
commit 39da277ead
7 changed files with 44 additions and 15 deletions

View File

@ -178,6 +178,17 @@ std::string toHex(const std::string &subject, int width, const char fill)
return ss.str();
}
std::string toHex(const std::vector<uint8_t> &input, int width, const char fill)
{
std::stringstream ss;
ss << std::hex;
for (unsigned int i = 0; i < input.size(); i++) {
ss << std::setw(width) << std::setfill(fill) << static_cast<int>(input[i]);
}
return ss.str();
}
// clang-format off
int fromHexChar(char c)
{