Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
21 lines (16 sloc) 638 Bytes
import android.util.Base64
class AndroidBase64Decoder : Base64Decoder {
override fun decode(string: String): String {
return Base64.decode(string, Base64.DEFAULT).toString(Charsets.UTF_8)
override fun decodeToBytes(string: String): ByteArray {
return Base64.decode(string, Base64.DEFAULT)
override fun decodeUrl(string: String): String {
return Base64.decode(string, Base64.URL_SAFE).toString(Charsets.UTF_8)
override fun decodeUrlToBytes(string: String): ByteArray {
return Base64.decode(string, Base64.URL_SAFE)