]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: base64 - Add structural comments.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Fri, 17 May 2019 08:09:11 +0000 (10:09 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 10 Sep 2019 07:02:24 +0000 (10:02 +0300)
src/lib/base64.c
src/lib/base64.h

index 4887bbd5b356d0e1f00bb6b7980ac0f849e82005..a60a6af7ead774cc96e4b77cc35fb4fae2565bd0 100644 (file)
@@ -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];
 
index 0e0463df46f585ce7664d4151a629dec6ab09300..c52ec4fafe76aff1f2d263a8c38c72ea9e9e4ef6 100644 (file)
@@ -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);