refactor; start adding debugging logs to midpoint rend stuff

svn:r1445
This commit is contained in:
Nick Mathewson
2004-04-02 23:30:54 +00:00
parent 25a9bc594f
commit e8345bfced
11 changed files with 36 additions and 13 deletions
-2
View File
@@ -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)
{
+1
View File
@@ -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 */
+11
View File
@@ -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
+2
View File
@@ -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;