Skip to content

jershell/kbase64

Repository files navigation

kbase64

Download

kotlin multiplatform base64 implementation

Support platform

  • jvm
  • linuxX64

Install

build.gradle.kts

repositories {
    maven { url = uri("https://dl.bintray.com/jershell/generic") }
}

dependencies {
    // FOR JVM
    implementation("com.github.jershell:kbase64-jvm:0.0.1")
}

build.gradle

repositories {
    maven { 'https://dl.bintray.com/jershell/generic' }
}

dependencies {
    // FOR JVM
    implementation 'com.github.jershell:kbase64-jvm:0.0.1'
}

API

// Base
ByteArray.decodeBase64()
ByteArray.encodeBase64()

// Extension function

// decode from String or ByteArray
String.decodeBase64()
String.decodeBase64ToByteArray() 
ByteArray.decodeBase64ToString()

// encode to String
String.encodeToBase64()
ByteArray.encodeToBase64()

Usage