diff options
author | Yawning Angel <yawning@schwanenlied.me> | 2015-04-10 11:25:08 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-04-23 09:06:58 -0400 |
commit | 196499da73afa5c8000154aafe36c10b9ee43901 (patch) | |
tree | fb6343334ed05db14dbe3e8a14a2e18ee1534d08 /src/common/crypto.h | |
parent | ba2485f7df51b2daafaff8567320c34a22731e8e (diff) | |
download | tor-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.h | 5 |
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" |