]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
base64: Document PAD64.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 25 Mar 2025 00:45:31 +0000 (01:45 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 6 Apr 2025 20:30:43 +0000 (22:30 +0200)
This fixes another warning when doxygen is run with EXTRACT_ALL=NO.

base64.c

index ac6f65aa85d469df3ba4a70a058ed85b31eb6d11..7deac58c3aafc37e4ad2910461cf0b6c40830d8a 100644 (file)
--- 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.