summaryrefslogtreecommitdiff
path: root/src/common/crypto.h
diff options
context:
space:
mode:
authorYawning Angel <yawning@schwanenlied.me>2015-04-10 11:25:08 +0000
committerNick Mathewson <nickm@torproject.org>2015-04-23 09:06:58 -0400
commit196499da73afa5c8000154aafe36c10b9ee43901 (patch)
treefb6343334ed05db14dbe3e8a14a2e18ee1534d08 /src/common/crypto.h
parentba2485f7df51b2daafaff8567320c34a22731e8e (diff)
downloadtor-196499da73afa5c8000154aafe36c10b9ee43901.tar.gz
tor-196499da73afa5c8000154aafe36c10b9ee43901.zip
Use a custom Base64 encoder with more control over the output format.
Diffstat (limited to 'src/common/crypto.h')
-rw-r--r--src/common/crypto.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 440ff23ee8..2061ec3e72 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -267,7 +267,10 @@ struct smartlist_t;
void *smartlist_choose(const struct smartlist_t *sl);
void smartlist_shuffle(struct smartlist_t *sl);
-int base64_encode(char *dest, size_t destlen, const char *src, size_t srclen);
+#define BASE64_ENCODE_MULTILINE 1
+size_t base64_encode_size(size_t srclen, int flags);
+int base64_encode(char *dest, size_t destlen, const char *src, size_t srclen,
+ int flags);
int base64_decode(char *dest, size_t destlen, const char *src, size_t srclen);
/** Characters that can appear (case-insensitively) in a base32 encoding. */
#define BASE32_CHARS "abcdefghijklmnopqrstuvwxyz234567"