diff --git a/app/src/main/java/io/legado/app/utils/EncoderUtils.kt b/app/src/main/java/io/legado/app/utils/EncoderUtils.kt index fec85ff2c..54c528f03 100644 --- a/app/src/main/java/io/legado/app/utils/EncoderUtils.kt +++ b/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) + } }