[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 147/156: Added macro for base64 decoded size
From: |
gnunet |
Subject: |
[libmicrohttpd] 147/156: Added macro for base64 decoded size |
Date: |
Sun, 28 May 2023 17:53:20 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to tag v0.9.77
in repository libmicrohttpd.
commit 6f80708b754945b84966797a0dec45506f74bbcd
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Thu May 25 20:06:12 2023 +0300
Added macro for base64 decoded size
---
src/microhttpd/mhd_str.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/microhttpd/mhd_str.h b/src/microhttpd/mhd_str.h
index f4dc024c..02c8856a 100644
--- a/src/microhttpd/mhd_str.h
+++ b/src/microhttpd/mhd_str.h
@@ -452,6 +452,16 @@ MHD_uint8_to_str_pad (uint8_t val,
#ifdef BAUTH_SUPPORT
+/**
+ * Returns the maximum possible size of the Base64 decoded data.
+ * The real recoded size could be up to two bytes smaller.
+ * @param enc_size the size of encoded data, in characters
+ * @return the maximum possible size of the decoded data, in bytes, if
+ * @a enc_size is valid (properly padded),
+ * undefined value smaller then @a enc_size if @a enc_size is not valid
+ */
+#define MHD_base64_max_dec_size_(enc_size) (((enc_size) / 4) * 3)
+
/**
* Convert Base64 encoded string to binary data.
* @param base64 the input string with Base64 encoded data, could be NOT zero
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] 129/156: Detect sysctl() symbols in configure, (continued)
- [libmicrohttpd] 129/156: Detect sysctl() symbols in configure, gnunet, 2023/05/28
- [libmicrohttpd] 98/156: .gitignore: added universal patter to ignore test binaries, gnunet, 2023/05/28
- [libmicrohttpd] 140/156: Added support for custom command for tarball compression, gnunet, 2023/05/28
- [libmicrohttpd] 143/156: Fixed compiler warning when built without poll() support, gnunet, 2023/05/28
- [libmicrohttpd] 141/156: contrib/make-dist.sh: added use of zopfli if available, gnunet, 2023/05/28
- [libmicrohttpd] 142/156: daemon.c: redesigned code for clarity and formatting, gnunet, 2023/05/28
- [libmicrohttpd] 144/156: Avoided potential compiler warnings, gnunet, 2023/05/28
- [libmicrohttpd] 149/156: Removed Public Domain base64 decoding files, gnunet, 2023/05/28
- [libmicrohttpd] 151/156: ChangeLog: updated, gnunet, 2023/05/28
- [libmicrohttpd] 152/156: W32 VS project: reverted to standard arches names, gnunet, 2023/05/28
- [libmicrohttpd] 147/156: Added macro for base64 decoded size,
gnunet <=
- [libmicrohttpd] 156/156: Released GNU libmicrohttpd 0.9.77, gnunet, 2023/05/28
- [libmicrohttpd] 146/156: test_str_base64: added test for base64 decoding, gnunet, 2023/05/28
- [libmicrohttpd] 150/156: test_basicauth: added new test, gnunet, 2023/05/28
- [libmicrohttpd] 154/156: autoinit_funcs.h: fixed warning on MSVC, gnunet, 2023/05/28
- [libmicrohttpd] 148/156: Basic auth: switched to internal base64 decoding, gnunet, 2023/05/28
- [libmicrohttpd] 153/156: W32 VS Project: minor internal fixes, fixed files for "dist", gnunet, 2023/05/28
- [libmicrohttpd] 155/156: Updated 'po' files, gnunet, 2023/05/28
- [libmicrohttpd] 145/156: Implemented base64 decoding with thorough checks for the input data validity, gnunet, 2023/05/28
- [libmicrohttpd] 139/156: response.c: fixed code style, gnunet, 2023/05/28