pull/42/head
kunfei 5 years ago
parent 86c4e247d2
commit 758d7e585b
  1. 4
      app/src/main/java/io/legado/app/help/JsExtensions.kt
  2. 4
      app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt

@ -30,6 +30,10 @@ object JsExtensions {
return EncoderUtils.base64Decode(str) return EncoderUtils.base64Decode(str)
} }
fun base64Encode(str: String): String? {
return EncoderUtils.base64Encode(str)
}
fun base64Encode(str: String, flags: Int = Base64.NO_WRAP): String? { fun base64Encode(str: String, flags: Int = Base64.NO_WRAP): String? {
return EncoderUtils.base64Encode(str, flags) return EncoderUtils.base64Encode(str, flags)
} }

@ -577,6 +577,10 @@ class AnalyzeRule(private var book: BaseBook? = null) {
return EncoderUtils.base64Decode(str) return EncoderUtils.base64Decode(str)
} }
fun base64Encode(str: String): String? {
return EncoderUtils.base64Encode(str)
}
fun base64Encode(str: String, flags: Int = Base64.NO_WRAP): String? { fun base64Encode(str: String, flags: Int = Base64.NO_WRAP): String? {
return EncoderUtils.base64Encode(str, flags) return EncoderUtils.base64Encode(str, flags)
} }

Loading…
Cancel
Save