DevToys-app / DevToys

A Swiss Army knife for developers.
https://devtoys.app/
MIT License
27.53k stars 1.47k forks source link

Show warning when decoding with implicit base 64 padding #1076

Open notkvwu opened 8 months ago

notkvwu commented 8 months ago

What improvement do you think would an existing feature or tool in DevToys?

I work with a system that works with base64 values and DevToys has been a very useful for encoding and decoding those values. One issue we are facing is that our system is strict about the base64 length being divisible by 4. Often, we will try decoding in DevToys and it works fine (since I think DevToys will implicitly add the padding). I definitely see the value of that implicit padding for many use cases, but it makes it harder for us to determine what the issue is.

Solution/Idea

I think it would be good to surface some kind of warning, so it's easy to see that implicit padding has been added, since some systems will not recognize it as properly-formatted base64.

Alternatively, maybe it's possible to make an option to use strict base64 encoding/decoding.

Comments

No response

stevescruz commented 8 months ago

I faced a similar issue. That would be a great QoL enhancement