#21872: encoded length macros for baseXX encodings ------------------------------+-------------------------------- Reporter: catalyst | Owner: catalyst Type: enhancement | Status: new Priority: Medium | Milestone: Tor: 0.3.1.x-final Component: Core Tor/Tor | Version: Severity: Normal | Keywords: util Actual Points: | Parent ID: #19531 Points: | Reviewer: Sponsor: | ------------------------------+-------------------------------- It can be useful to have macros that give the lengths of byte strings encoded with baseXX, particularly for declaring fixed-size buffers. Some use cases will need to include a terminating NUL, others not. These macros won't check for overflow, so nothing should pass untrusted inputs to them.
I propose macros named like `BASE64_LEN()` for the raw length and like `BASE64_SIZE()` for the length with NUL. -- Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21872> Tor Bug Tracker & Wiki <https://trac.torproject.org/> The Tor Project: anonymity online _______________________________________________ tor-bugs mailing list tor-bugs@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs