From: Andre Noll Date: Tue, 25 Mar 2025 00:45:31 +0000 (+0100) Subject: base64: Document PAD64. X-Git-Url: https://git.tuebingen.mpg.de/?a=commitdiff_plain;h=14a1d1d1d3c9ca800b13ee9e437494388868abe8;p=paraslash.git base64: Document PAD64. This fixes another warning when doxygen is run with EXTRACT_ALL=NO. --- diff --git a/base64.c b/base64.c index ac6f65aa..7deac58c 100644 --- a/base64.c +++ b/base64.c @@ -51,6 +51,15 @@ static const unsigned char base64_tab[256] = { /** Maximal possible size of the decoded data. */ #define BASE64_MAX_DECODED_SIZE(_encoded_size) ((_encoded_size) / 4 * 3) +/** + * The padding character which is appended to base64 encoded data. + * + * base64 encoded data is always an ascii string whose length is a multiple of + * four. If the number of characters needed to encode the data is not a + * multiple of four, the encoded string is padded with this character. The + * number of pad characters is either 0, 1 or 2, but never 3, and this number + * is a function of the number of bytes of the unencrypted data modulo 3. + */ #define PAD64 '=' /** * base64-decode a buffer.