Open dtinth opened 2 years ago
I'm a strong believer in strict encoding/decoding. If the intention is to decode data with whitespaces, it should be explicitly handled by the user by removing them. Especially since this library attempts to be constant-time, unlike others. So I will not enable this by default.
However, there could be a specific decoder, similar to URLSafeCoder
, which will skip whitespaces on decoding, and even maybe format on encoding (like openssl base64
).
Most base-64 decoding libraries accept (and ignore) whitespaces, however this library throws an error.
It would be much more convenient if this library is more lenient in reading base64 data by skipping whitespace characters.