mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
refactor; start adding debugging logs to midpoint rend stuff
svn:r1445
This commit is contained in:
@@ -109,6 +109,17 @@ void set_uint32(char *cp, uint32_t v)
|
||||
}
|
||||
#endif
|
||||
|
||||
void hex_encode(const char *from, int fromlen, char *to)
|
||||
{
|
||||
const unsigned char *fp = from;
|
||||
static const char TABLE[] = "0123456789abcdef";
|
||||
while (fromlen) {
|
||||
*to++ = TABLE[*fp >> 4];
|
||||
*to++ = TABLE[*fp & 7];
|
||||
++fp;
|
||||
}
|
||||
*to = '\0';
|
||||
}
|
||||
|
||||
/*
|
||||
* A simple smartlist interface to make an unordered list of acceptable
|
||||
|
||||
Reference in New Issue
Block a user