pull/38/head
kunfei 5 years ago
parent 7f78c38fb1
commit 8ae0ec73fa
  1. 2
      app/src/main/java/io/legado/app/help/JsExtensions.kt
  2. 2
      app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt
  3. 4
      app/src/main/java/io/legado/app/utils/EncoderUtils.kt

@ -29,7 +29,7 @@ object JsExtensions {
return EncoderUtils.base64Decoder(str) return EncoderUtils.base64Decoder(str)
} }
fun base64Encoder(str: String): ByteArray? { fun base64Encoder(str: String): String? {
return EncoderUtils.base64Encoder(str) return EncoderUtils.base64Encoder(str)
} }

@ -576,7 +576,7 @@ class AnalyzeRule(private var book: BaseBook? = null) {
return EncoderUtils.base64Decoder(str) return EncoderUtils.base64Decoder(str)
} }
fun base64Encoder(str: String): ByteArray? { fun base64Encoder(str: String): String? {
return EncoderUtils.base64Encoder(str) return EncoderUtils.base64Encoder(str)
} }

@ -33,7 +33,7 @@ object EncoderUtils {
} }
} }
fun base64Encoder(str: String): ByteArray? { fun base64Encoder(str: String): String? {
return Base64.encode(str.toByteArray(), Base64.DEFAULT) return Base64.encodeToString(str.toByteArray(), Base64.DEFAULT)
} }
} }
Loading…
Cancel
Save