marshallpierce / rust-base64

base64, in rust
Apache License 2.0
606 stars 113 forks source link

How do I change the padding character? #215

Closed ShayBox closed 1 year ago

ShayBox commented 1 year ago

I'm trying to use Base64R from No-Chat-Reports
I believe I have the alphabet working but the padding character is also changed, how do I change the padding character with this crate?

const BASE64R: &str = "!\"#$%¼'(),-.:;<=>?@[\\]^_`{|}~¡¢£¤¥¦¨©ª«¬®¯°±²³µ¶·¸¹º0123456789+»";
marshallpierce commented 1 year ago

My condolences for having to work with such an utterly ridiculous format. The padding byte is not configurable. Padding is useless anyway, but I suggest just replacing those bytes after encoding and before decoding if you must have it.