Kotlin / KEEP

Kotlin Evolution and Enhancement Process
Apache License 2.0
3.29k stars 357 forks source link

Base64 #373

Open qurbonzoda opened 2 months ago

qurbonzoda commented 2 months ago

This issue is for discussion of the proposed API for Base64 encoding and decoding. The full text of the proposal is here.

The API is already available in Kotlin 1.8.20+ as @ExperimentalStdlibApi.

mgroth0 commented 2 months ago

Reiterating my request for withoutPadding(). I am curious if this could be part of the first version. It would be helpful to those who want to migrate from java.util.Base64, since that has a withoutPadding() builder option.

If this isn't included in the first release, people might start writing their own withoutPadding functions. Not the end of the world, but it's just a crack for a bug to slip in.

qurbonzoda commented 2 months ago

@mgroth0 We will definitely discuss all requests before stabilising Base64. There is a chance that withoutPadding() will be there once it stabilises. And we will take this into account as well

If this isn't included in the first release, people might start writing their own withoutPadding functions. Not the end of the world, but it's just a crack for a bug to slip in.