|
|
@@ -3,7 +3,6 @@ package io.legado.app.help
|
|
|
import android.net.Uri
|
|
|
import android.util.Base64
|
|
|
import androidx.annotation.Keep
|
|
|
-import cn.hutool.crypto.SecureUtil
|
|
|
import cn.hutool.crypto.digest.DigestUtil
|
|
|
import cn.hutool.crypto.digest.HMac
|
|
|
import io.legado.app.constant.AppConst
|
|
|
@@ -11,7 +10,10 @@ import io.legado.app.constant.AppConst.dateFormat
|
|
|
import io.legado.app.constant.AppLog
|
|
|
import io.legado.app.data.entities.BaseSource
|
|
|
import io.legado.app.exception.NoStackTraceException
|
|
|
-import io.legado.app.help.http.*
|
|
|
+import io.legado.app.help.http.BackstageWebView
|
|
|
+import io.legado.app.help.http.CookieStore
|
|
|
+import io.legado.app.help.http.SSLHelper
|
|
|
+import io.legado.app.help.http.StrResponse
|
|
|
import io.legado.app.model.Debug
|
|
|
import io.legado.app.model.analyzeRule.AnalyzeUrl
|
|
|
import io.legado.app.model.analyzeRule.QueryTTF
|
|
|
@@ -613,7 +615,7 @@ interface JsExtensions {
|
|
|
): ByteArray? {
|
|
|
return try {
|
|
|
EncoderUtils.decryptAES(
|
|
|
- data = SecureUtil.decode(str),
|
|
|
+ data = str.encodeToByteArray(),
|
|
|
key = key.encodeToByteArray(),
|
|
|
transformation,
|
|
|
iv.encodeToByteArray()
|
|
|
@@ -657,7 +659,7 @@ interface JsExtensions {
|
|
|
iv: String
|
|
|
): String? {
|
|
|
return EncoderUtils.decryptAES(
|
|
|
- SecureUtil.decode(data),
|
|
|
+ data.encodeToByteArray(),
|
|
|
Base64.decode(key, Base64.NO_WRAP),
|
|
|
"AES/${mode}/${padding}",
|
|
|
Base64.decode(iv, Base64.NO_WRAP)
|
|
|
@@ -808,7 +810,7 @@ interface JsExtensions {
|
|
|
data: String, key: String, transformation: String, iv: String
|
|
|
): String? {
|
|
|
return EncoderUtils.decryptDES(
|
|
|
- SecureUtil.decode(data),
|
|
|
+ data.encodeToByteArray(),
|
|
|
key.encodeToByteArray(),
|
|
|
transformation,
|
|
|
iv.encodeToByteArray()
|
|
|
@@ -819,7 +821,7 @@ interface JsExtensions {
|
|
|
data: String, key: String, transformation: String, iv: String
|
|
|
): String? {
|
|
|
return EncoderUtils.decryptBase64DES(
|
|
|
- SecureUtil.decode(data),
|
|
|
+ data.encodeToByteArray(),
|
|
|
key.encodeToByteArray(),
|
|
|
transformation,
|
|
|
iv.encodeToByteArray()
|
|
|
@@ -867,7 +869,7 @@ interface JsExtensions {
|
|
|
iv: String
|
|
|
): String? {
|
|
|
return EncoderUtils.decryptDESede(
|
|
|
- SecureUtil.decode(data),
|
|
|
+ data.encodeToByteArray(),
|
|
|
key.encodeToByteArray(),
|
|
|
"DESede/${mode}/${padding}",
|
|
|
iv.encodeToByteArray()
|
|
|
@@ -892,7 +894,7 @@ interface JsExtensions {
|
|
|
iv: String
|
|
|
): String? {
|
|
|
return EncoderUtils.decryptDESede(
|
|
|
- SecureUtil.decode(data),
|
|
|
+ data.encodeToByteArray(),
|
|
|
Base64.decode(key, Base64.NO_WRAP),
|
|
|
"DESede/${mode}/${padding}",
|
|
|
Base64.decode(iv, Base64.NO_WRAP)
|