From a0fc5fe58811ac2c5032372258a6b19785e36b9e Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 23 Oct 2019 15:27:43 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/help/JsExtensions.kt | 8 ++++---- .../java/io/legado/app/model/analyzeRule/AnalyzeRule.kt | 8 ++++---- app/src/main/java/io/legado/app/utils/EncoderUtils.kt | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/JsExtensions.kt b/app/src/main/java/io/legado/app/help/JsExtensions.kt index 6a0a87109..8d54ac21c 100644 --- a/app/src/main/java/io/legado/app/help/JsExtensions.kt +++ b/app/src/main/java/io/legado/app/help/JsExtensions.kt @@ -25,12 +25,12 @@ object JsExtensions { /** * js实现解码,不能删 */ - fun base64Decoder(str: String): String { - return EncoderUtils.base64Decoder(str) + fun base64Decode(str: String): String { + return EncoderUtils.base64Decode(str) } - fun base64Encoder(str: String): String? { - return EncoderUtils.base64Encoder(str) + fun base64Encode(str: String): String? { + return EncoderUtils.base64Encode(str) } fun strToMd5By32(str: String?): String? { diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt index 501e00777..831714667 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt @@ -572,12 +572,12 @@ class AnalyzeRule(private var book: BaseBook? = null) { /** * js实现解码,不能删 */ - fun base64Decoder(str: String): String { - return EncoderUtils.base64Decoder(str) + fun base64Decode(str: String): String { + return EncoderUtils.base64Decode(str) } - fun base64Encoder(str: String): String? { - return EncoderUtils.base64Encoder(str) + fun base64Encode(str: String): String? { + return EncoderUtils.base64Encode(str) } fun strToMd5By32(str: String?): String? { 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 9e98b35db..8e5c03522 100644 --- a/app/src/main/java/io/legado/app/utils/EncoderUtils.kt +++ b/app/src/main/java/io/legado/app/utils/EncoderUtils.kt @@ -24,7 +24,7 @@ object EncoderUtils { return tmp.toString() } - fun base64Decoder(str: String): String { + fun base64Decode(str: String): String { val bytes = Base64.decode(str, Base64.DEFAULT) return try { String(bytes, StandardCharsets.UTF_8) @@ -33,7 +33,7 @@ object EncoderUtils { } } - fun base64Encoder(str: String): String? { + fun base64Encode(str: String): String? { return Base64.encodeToString(str.toByteArray(), Base64.DEFAULT) } } \ No newline at end of file