0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00
zig/lib/std/crypto/codecs
Frank Denis fc9184e652 base64: properly compute the decoded size upper bound
First, the correct length for decoding should be computed with
/4*3 , not the other way round as when encoding.

But also, without padding, a string such as "Zg" is valid base64
(here, it's the character 'f', padded base64 would be "Zg==").

decodedLenUpperBound() returned 0 instead of 1 in that example.

Correctly fix the computation of the upper bound.
History 2026-10-06 10:44:11 +02:00
..
asn1 asn1: replace use of deprecated lang.Type.Enum API 2026-08-15 06:19:09 +02:00
asn1.zig asn1: replace use of deprecated lang.Type.Enum API 2026-08-15 06:19:09 +02:00
base64_hex_ct.zig base64: properly compute the decoded size upper bound 2026-10-06 10:44:11 +02:00