Real-world Base64 (PEM, MIME, HTTP headers) carries \n and spaces, which the current decoders reject. Add an opt-in flag to skip whitespace during decode.
Architecture fit
- Opt-in
ignoreWhitespace (a.k.a. relaxed) flag on the alphabet decoders, default false so shipped behavior is unchanged (contract invariant).
- Minimal scope: at least Base64/Base32/Base16; document which characters are treated as whitespace.
Effort: S–M
Checklist
Real-world Base64 (PEM, MIME, HTTP headers) carries
\nand spaces, which the current decoders reject. Add an opt-in flag to skip whitespace during decode.Architecture fit
ignoreWhitespace(a.k.a.relaxed) flag on the alphabet decoders, defaultfalseso shipped behavior is unchanged (contract invariant).Effort: S–M
Checklist
ignoreWhitespaceflag onAlphabetDecoder(default false)