jvmMain.io.github.katerinapetrova.mpplib.Base64.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mpp-sample-lib-jvm Show documentation
Show all versions of mpp-sample-lib-jvm Show documentation
Sample Kotlin Multiplatform library (jvm + ios + js) test
The newest version!
package io.github.katerinapetrova.mpplib
import java.util.*
actual object Base64Factory {
actual fun createEncoder(): Base64Encoder = JvmBase64Encoder
}
object JvmBase64Encoder : Base64Encoder {
override fun encode(src: ByteArray): ByteArray = Base64.getEncoder().encode(src)
override fun encodeToString(src: ByteArray): String = Base64.getEncoder().encodeToString(src)
}