Join Slack
Powered by
Hi, How do you encode/decode base64 in common code...
# multiplatform
j
J茅r么me Gully
11/24/2020, 9:55 AM
Hi, How do you encode/decode base64 in common code ? You go down to the android/ios specific sourceset ? I found that but it's seems forgotten
https://github.com/Kotlin/kotlin-examples/pull/90
g
gildor
11/24/2020, 10:07 AM
There is no common base64, the easisest solution is use platfrom specific library + expect/actual
j
Julius
11/24/2020, 10:52 AM
You can try this solution:
https://discuss.kotlinlang.org/t/kotlin-native-base64-en-decoder-code/10043
b
Benjamin Charais
11/24/2020, 5:39 PM
Krypto library has a pretty simple base64 impl:
https://korlibs.soywiz.com/krypto/
https://github.com/korlibs/krypto/blob/master/krypto/src/commonMain/kotlin/com/soywiz/krypto/encoding/Base64.kt
j
J茅r么me Gully
01/11/2021, 5:03 PM
A bit late, but yeah I used krypto and it's working fine 馃檪
16
Views
Open in Slack
Previous
Next