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 754751b01..e615ad435 100644 --- a/app/src/main/java/io/legado/app/help/JsExtensions.kt +++ b/app/src/main/java/io/legado/app/help/JsExtensions.kt @@ -38,12 +38,12 @@ object JsExtensions { return EncoderUtils.base64Encode(str, flags) } - fun strToMd5By32(str: String): String? { - return MD5Utils.strToMd5By32(str) + fun md5Encode(str: String): String? { + return MD5Utils.md5Encode(str) } - fun strToMd5By16(str: String): String? { - return MD5Utils.strToMd5By16(str) + fun md5Encode16(str: String): String? { + return MD5Utils.md5Encode16(str) } } 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 ebfa3dc50..ea13a64c2 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 @@ -584,12 +584,12 @@ class AnalyzeRule(private var book: BaseBook? = null) { return EncoderUtils.base64Encode(str, flags) } - fun strToMd5By32(str: String): String? { - return MD5Utils.strToMd5By32(str) + fun md5Encode(str: String): String? { + return MD5Utils.md5Encode(str) } - fun strToMd5By16(str: String): String? { - return MD5Utils.strToMd5By16(str) + fun md5Encode16(str: String): String? { + return MD5Utils.md5Encode16(str) } /** diff --git a/app/src/main/java/io/legado/app/utils/MD5Utils.kt b/app/src/main/java/io/legado/app/utils/MD5Utils.kt index dda1df688..a83345bc6 100644 --- a/app/src/main/java/io/legado/app/utils/MD5Utils.kt +++ b/app/src/main/java/io/legado/app/utils/MD5Utils.kt @@ -9,7 +9,7 @@ import java.security.NoSuchAlgorithmException object MD5Utils { - fun strToMd5By32(str: String?): String? { + fun md5Encode(str: String?): String? { if (str == null) return null var reStr: String? = null try { @@ -31,8 +31,8 @@ object MD5Utils { return reStr } - fun strToMd5By16(str: String): String? { - var reStr = strToMd5By32(str) + fun md5Encode16(str: String): String? { + var reStr = md5Encode(str) if (reStr != null) { reStr = reStr.substring(8, 24) }