From: Stephan Bosch Date: Fri, 17 May 2019 08:09:11 +0000 (+0200) Subject: lib: base64 - Add structural comments. X-Git-Tag: 2.3.8~139 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3ae0618d44fdbb4f0987e3c7a6bd8d12f5a5a036;p=thirdparty%2Fdovecot%2Fcore.git lib: base64 - Add structural comments. --- diff --git a/src/lib/base64.c b/src/lib/base64.c index 4887bbd5b3..a60a6af7ea 100644 --- a/src/lib/base64.c +++ b/src/lib/base64.c @@ -4,6 +4,10 @@ #include "base64.h" #include "buffer.h" +/* + * "base64" encoding (RFC 4648, Section 4) + */ + static const char b64enc[]; static const unsigned char b64dec[256]; diff --git a/src/lib/base64.h b/src/lib/base64.h index 0e0463df46..c52ec4fafe 100644 --- a/src/lib/base64.h +++ b/src/lib/base64.h @@ -1,6 +1,10 @@ #ifndef BASE64_H #define BASE64_H +/* + * Common Base64 + */ + /* max. buffer size required for base64_encode() */ #define MAX_BASE64_ENCODED_SIZE(size) \ ((((size) + 2) / 3) * 4) @@ -8,6 +12,10 @@ #define MAX_BASE64_DECODED_SIZE(size) \ (((size) + 3) / 4 * 3) +/* + * "base64" encoding (RFC 4648, Section 4) + */ + /* Translates binary data into base64. The src must not point to dest buffer. */ void base64_encode(const void *src, size_t src_size, buffer_t *dest);