Loading src/common/crypto.c +6 −6 Original line number Diff line number Diff line Loading @@ -2579,7 +2579,7 @@ smartlist_shuffle(smartlist_t *sl) } } /** Base-64 encode <b>srclen</b> bytes of data from <b>src</b>. Write /** Base64 encode <b>srclen</b> bytes of data from <b>src</b>. Write * the result into <b>dest</b>, if it will fit within <b>destlen</b> * bytes. Return the number of bytes written on success; -1 if * destlen is too short, or other failure. Loading Loading @@ -2638,7 +2638,7 @@ static const uint8_t base64_decode_table[256] = { X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, }; /** Base-64 decode <b>srclen</b> bytes of data from <b>src</b>. Write /** Base64 decode <b>srclen</b> bytes of data from <b>src</b>. Write * the result into <b>dest</b>, if it will fit within <b>destlen</b> * bytes. Return the number of bytes written on success; -1 if * destlen is too short, or other failure. Loading Loading @@ -2745,7 +2745,7 @@ base64_decode(char *dest, size_t destlen, const char *src, size_t srclen) #undef SP #undef PAD /** Base-64 encode DIGEST_LINE bytes from <b>digest</b>, remove the trailing = /** Base64 encode DIGEST_LINE bytes from <b>digest</b>, remove the trailing = * and newline characters, and store the nul-terminated result in the first * BASE64_DIGEST_LEN+1 bytes of <b>d64</b>. */ int Loading @@ -2758,7 +2758,7 @@ digest_to_base64(char *d64, const char *digest) return 0; } /** Given a base-64 encoded, nul-terminated digest in <b>d64</b> (without /** Given a base64 encoded, nul-terminated digest in <b>d64</b> (without * trailing newline or = characters), decode it and store the result in the * first DIGEST_LEN bytes at <b>digest</b>. */ int Loading @@ -2783,7 +2783,7 @@ digest_from_base64(char *digest, const char *d64) #endif } /** Base-64 encode DIGEST256_LINE bytes from <b>digest</b>, remove the /** Base64 encode DIGEST256_LINE bytes from <b>digest</b>, remove the * trailing = and newline characters, and store the nul-terminated result in * the first BASE64_DIGEST256_LEN+1 bytes of <b>d64</b>. */ int Loading @@ -2796,7 +2796,7 @@ digest256_to_base64(char *d64, const char *digest) return 0; } /** Given a base-64 encoded, nul-terminated digest in <b>d64</b> (without /** Given a base64 encoded, nul-terminated digest in <b>d64</b> (without * trailing newline or = characters), decode it and store the result in the * first DIGEST256_LEN bytes at <b>digest</b>. */ int Loading src/common/crypto.h +1 −1 Original line number Diff line number Diff line Loading @@ -266,7 +266,7 @@ void smartlist_shuffle(struct smartlist_t *sl); int base64_encode(char *dest, size_t destlen, const char *src, size_t srclen); int base64_decode(char *dest, size_t destlen, const char *src, size_t srclen); /** Characters that can appear (case-insensitively) in a base-32 encoding. */ /** Characters that can appear (case-insensitively) in a base32 encoding. */ #define BASE32_CHARS "abcdefghijklmnopqrstuvwxyz234567" void base32_encode(char *dest, size_t destlen, const char *src, size_t srclen); int base32_decode(char *dest, size_t destlen, const char *src, size_t srclen); Loading src/or/rendcommon.c +1 −1 Original line number Diff line number Diff line Loading @@ -954,7 +954,7 @@ rend_cache_lookup_entry(const char *query, int version, rend_cache_entry_t **e) return 1; } /** <b>query</b> is a base-32'ed service id. If it's malformed, return -1. /** <b>query</b> is a base32'ed service id. If it's malformed, return -1. * Else look it up. * - If it is found, point *desc to it, and write its length into * *desc_len, and return 1. Loading Loading
src/common/crypto.c +6 −6 Original line number Diff line number Diff line Loading @@ -2579,7 +2579,7 @@ smartlist_shuffle(smartlist_t *sl) } } /** Base-64 encode <b>srclen</b> bytes of data from <b>src</b>. Write /** Base64 encode <b>srclen</b> bytes of data from <b>src</b>. Write * the result into <b>dest</b>, if it will fit within <b>destlen</b> * bytes. Return the number of bytes written on success; -1 if * destlen is too short, or other failure. Loading Loading @@ -2638,7 +2638,7 @@ static const uint8_t base64_decode_table[256] = { X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, }; /** Base-64 decode <b>srclen</b> bytes of data from <b>src</b>. Write /** Base64 decode <b>srclen</b> bytes of data from <b>src</b>. Write * the result into <b>dest</b>, if it will fit within <b>destlen</b> * bytes. Return the number of bytes written on success; -1 if * destlen is too short, or other failure. Loading Loading @@ -2745,7 +2745,7 @@ base64_decode(char *dest, size_t destlen, const char *src, size_t srclen) #undef SP #undef PAD /** Base-64 encode DIGEST_LINE bytes from <b>digest</b>, remove the trailing = /** Base64 encode DIGEST_LINE bytes from <b>digest</b>, remove the trailing = * and newline characters, and store the nul-terminated result in the first * BASE64_DIGEST_LEN+1 bytes of <b>d64</b>. */ int Loading @@ -2758,7 +2758,7 @@ digest_to_base64(char *d64, const char *digest) return 0; } /** Given a base-64 encoded, nul-terminated digest in <b>d64</b> (without /** Given a base64 encoded, nul-terminated digest in <b>d64</b> (without * trailing newline or = characters), decode it and store the result in the * first DIGEST_LEN bytes at <b>digest</b>. */ int Loading @@ -2783,7 +2783,7 @@ digest_from_base64(char *digest, const char *d64) #endif } /** Base-64 encode DIGEST256_LINE bytes from <b>digest</b>, remove the /** Base64 encode DIGEST256_LINE bytes from <b>digest</b>, remove the * trailing = and newline characters, and store the nul-terminated result in * the first BASE64_DIGEST256_LEN+1 bytes of <b>d64</b>. */ int Loading @@ -2796,7 +2796,7 @@ digest256_to_base64(char *d64, const char *digest) return 0; } /** Given a base-64 encoded, nul-terminated digest in <b>d64</b> (without /** Given a base64 encoded, nul-terminated digest in <b>d64</b> (without * trailing newline or = characters), decode it and store the result in the * first DIGEST256_LEN bytes at <b>digest</b>. */ int Loading
src/common/crypto.h +1 −1 Original line number Diff line number Diff line Loading @@ -266,7 +266,7 @@ void smartlist_shuffle(struct smartlist_t *sl); int base64_encode(char *dest, size_t destlen, const char *src, size_t srclen); int base64_decode(char *dest, size_t destlen, const char *src, size_t srclen); /** Characters that can appear (case-insensitively) in a base-32 encoding. */ /** Characters that can appear (case-insensitively) in a base32 encoding. */ #define BASE32_CHARS "abcdefghijklmnopqrstuvwxyz234567" void base32_encode(char *dest, size_t destlen, const char *src, size_t srclen); int base32_decode(char *dest, size_t destlen, const char *src, size_t srclen); Loading
src/or/rendcommon.c +1 −1 Original line number Diff line number Diff line Loading @@ -954,7 +954,7 @@ rend_cache_lookup_entry(const char *query, int version, rend_cache_entry_t **e) return 1; } /** <b>query</b> is a base-32'ed service id. If it's malformed, return -1. /** <b>query</b> is a base32'ed service id. If it's malformed, return -1. * Else look it up. * - If it is found, point *desc to it, and write its length into * *desc_len, and return 1. Loading