Closed this issue 4 years ago · 1 comments
Currently, the base64 encoder is not url safe. It would be nice to have an option for that. According to the RFC 4648, you just have to replace the "+" and "/" here with "-" and "_".
Contributions welcome here:
https://github.com/korlibs/krypto/blob/47796f1f99a4daffa4d68b23cbe56e855376eca2/krypto/src/commonMain/kotlin/com/soywiz/krypto/encoding/Base64.kt#L90
A proposal would be:
fun ByteArray.toBase64UrlSafe(): String