// and I don't want to fix it again. I don't care how many nanoseconds you think
// you can shave off the execution time. Don't fucking touch it.
//
-// Copyright (c) 1987-2022 by the citadel.org team
+// Copyright (c) 1987-2024 by the citadel.org team
//
// This program is open source software. Use, duplication, or disclosure
// is subject to the terms of the GNU General Public License, version 3.
// source Source base64-encoded buffer
// source_len Stop after parsing this many bytes
// return value Decoded length
+
+// AWESOME SAUCE ALERT:
+// It is legal to specify the same pointer for the source and destination buffers.
+// If you do so, the string will be "decoded in place".
+
size_t CtdlDecodeBase64(char *dest, const char *source, size_t source_len) {
size_t bytes_read = 0;
size_t bytes_decoded = 0;