summaryrefslogtreecommitdiff
path: root/src/common/util_format.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@ev0ke.net>2016-02-08 15:00:56 -0500
committerNick Mathewson <nickm@torproject.org>2016-06-17 13:53:47 -0400
commit4e4a7d2b0c199227252a742541461ec4cc35d358 (patch)
tree5d571ffc79aed630a43768faea1208b93d427413 /src/common/util_format.h
parenta427a7c479d633ad74819729eb2412c5c5e9e97e (diff)
downloadtor-4e4a7d2b0c199227252a742541461ec4cc35d358.tar.gz
tor-4e4a7d2b0c199227252a742541461ec4cc35d358.zip
Fix base32 API to take any source length in bytes
Fixes #18280 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
Diffstat (limited to 'src/common/util_format.h')
-rw-r--r--src/common/util_format.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/util_format.h b/src/common/util_format.h
index a748a4f3cf..20ac711d10 100644
--- a/src/common/util_format.h
+++ b/src/common/util_format.h
@@ -24,6 +24,7 @@ int base64_decode_nopad(uint8_t *dest, size_t destlen,
#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);
+size_t base32_encoded_size(size_t srclen);
int hex_decode_digit(char c);
void base16_encode(char *dest, size_t destlen, const char *src, size_t srclen);