MCPcopy Create free account
hub / github.com/Snapchat/Valdi / bytesToHexString

Function bytesToHexString

valdi/src/valdi/runtime/Utils/HexUtils.cpp:35–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35std::string bytesToHexString(const Byte* input, size_t inputLength) {
36 std::stringstream stream;
37 stream << std::hex << std::setfill('0');
38
39 for (size_t i = 0; i < inputLength; i++) {
40 auto b = input[i];
41 stream << std::setw(2) << static_cast<int>(b);
42 }
43
44 return stream.str();
45}
46
47} // namespace Valdi

Callers 2

TESTFunction · 0.85
sha256StringMethod · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68