Update EncoderUtils.kt

pull/2604/head
iyhkhtrk 2 years ago committed by GitHub
parent 99f3f08cad
commit 30d14ee69c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      app/src/main/java/io/legado/app/utils/EncoderUtils.kt

@ -37,5 +37,10 @@ object EncoderUtils {
fun base64Encode(str: String, flags: Int = Base64.NO_WRAP): String? {
return Base64.encodeToString(str.toByteArray(), flags)
}
@JvmOverloads
fun base64DecodeToByteArray(str: String, flags: Int = Base64.DEFAULT): ByteArray {
return Base64.decode(str, flags)
}
}

Loading…
Cancel
Save