INNER CODE UNIT · C++
rem
trailofbits/uthenticode · src/uthenticode.cpp:60
auto rem = x % factor;
if (rem == 0) {
return x;
}
return x + factor - rem;
}
/**
* Converts the given buffer into a hexadecimal string representation.
*
* @param buf the input buffer
* @param len the buffer's size
* @return the hex string
*/
static inline std::string tohex(std::uint8_t *buf, std::size_t len) {
constexpr static char lookup_table[] = "0123456789ABCDEF";
if (!buf || !len) {