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:
@@ -1403,8 +1403,6 @@ base64_decode(char *dest, int destlen, const char *src, int srclen)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const char BASE32_CHARS[] = "abcdefghijklmnopqrstuvwxyz012345";
|
||||
|
||||
int
|
||||
base32_encode(char *dest, int destlen, const char *src, int srclen)
|
||||
{
|
||||
|
||||
@@ -77,6 +77,7 @@ int crypto_pk_check_fingerprint_syntax(const char *s);
|
||||
|
||||
int base64_encode(char *dest, int destlen, const char *src, int srclen);
|
||||
int base64_decode(char *dest, int destlen, const char *src, int srclen);
|
||||
#define BASE32_CHARS "abcdefghijklmnopqrstuvwxyz012345"
|
||||
int base32_encode(char *dest, int destlen, const char *src, int srclen);
|
||||
|
||||
/* Key negotiation */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -81,6 +81,8 @@ void set_uint32(char *cp, uint32_t v);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void hex_encode(const char *from, int fromlen, char *to);
|
||||
|
||||
typedef struct smartlist_t {
|
||||
void **list;
|
||||
int num_used;
|
||||
|
||||
Reference in New Issue
Block a user