2 ms·
> Interestingly "change_me!" is no longer legal, but the decoder might drop illegal characters and decode it anyway... Python’s infamously does that which can
by masklinn 5y ago
> Interestingly "change_me!" is no longer legal, but the decoder might drop illegal characters and decode it anyway...
Python’s infamously does that which can be a nasty surprise the first time you stumble upon it.
Validation of the input alphabet is opt-in (and somewhat recent), the default is stripping (probably originally for simplicity with respect to MIME) and will only error on padding check failure.
Somewhat oddly given the alphabet validation thing, the stdlib does not support unpadded base64 whether as input or output.