From 2b2ad2c10770c6a864f3ada1e2803ed72c8dfa1b Mon Sep 17 00:00:00 2001 From: David Phillips Date: Mon, 11 Mar 2019 17:40:01 +1300 Subject: Move comments to headers where applicable --- onion_base32.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'onion_base32.h') diff --git a/onion_base32.h b/onion_base32.h index 854c6f9..3ed2bf7 100644 --- a/onion_base32.h +++ b/onion_base32.h @@ -1,3 +1,17 @@ +/* Find the first instance of a character in `subject` which is not in the + * base32 alphabet. + * Returns the offset into `subject` of the first such character, or -1 + * if no such character exists in the string + */ int check_base32(char *); + +/* Simple and reliable base32 algorithm - "old trusty" + * Note: This is not a general base32 algorithm; it outputs only the + * first 16 base32 symbols of the input buffer, using only the first + * 20 bytes of that buffer. + */ void onion_base32(char [16], unsigned char (*)); + +/* Simple algorithm to decode a 16-byte base32 sequence to the 10 bytes + * it represents, placing the result in dec */ void onion_base32_dec(unsigned char [10], char[16]); -- cgit v1.1