diff --git a/library/build.gradle b/library/build.gradle index f4a8f46c9..ae56b4e0c 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -119,7 +119,7 @@ dependencies { api project(':libs:lib_utils') api project(':libs:lib_core') - api project(':libs:lib_encrypt') + api project(':libs:lib_encipher') } repositories { mavenCentral() diff --git a/library/src/main/java/com/chwl/library/utils/codec/DESUtils.java b/library/src/main/java/com/chwl/library/utils/codec/DESUtils.java index 4c8f68a1c..3e0580577 100644 --- a/library/src/main/java/com/chwl/library/utils/codec/DESUtils.java +++ b/library/src/main/java/com/chwl/library/utils/codec/DESUtils.java @@ -2,14 +2,14 @@ package com.chwl.library.utils.codec; import com.chwl.library.utils.StringUtils; -import com.example.lib_encrypt.EncryptLib; +import com.secure.encipher.EncipherLib; public class DESUtils { //客户端加密 public static String DESAndBase64Encrypt(String dataToEncrypt) throws Exception { - return EncryptLib.INSTANCE.encryptTextDef1(dataToEncrypt); + return EncipherLib.INSTANCE.encryptTextDef1(dataToEncrypt); } public static String DESAndBase64(String psw) { @@ -25,13 +25,13 @@ public class DESUtils { //服务端解密 public static String DESAndBase64Decrypt(String dataBase64) throws Exception { if (StringUtils.isEmpty(dataBase64)) return null; - return EncryptLib.INSTANCE.decryptTextDef1(dataBase64); + return EncipherLib.INSTANCE.decryptTextDef1(dataBase64); } //解密 public static String decryptDef2(String dataBase64) throws Exception { if (StringUtils.isEmpty(dataBase64)) return null; - return EncryptLib.INSTANCE.decryptTextDef2(dataBase64); + return EncipherLib.INSTANCE.decryptTextDef2(dataBase64); } } \ No newline at end of file diff --git a/libs/lib_encrypt/.gitignore b/libs/lib_encipher/.gitignore similarity index 100% rename from libs/lib_encrypt/.gitignore rename to libs/lib_encipher/.gitignore diff --git a/libs/lib_encrypt/build.gradle b/libs/lib_encipher/build.gradle similarity index 82% rename from libs/lib_encrypt/build.gradle rename to libs/lib_encipher/build.gradle index 8e05f494b..59196ae4d 100644 --- a/libs/lib_encrypt/build.gradle +++ b/libs/lib_encipher/build.gradle @@ -1,7 +1,7 @@ apply from : "../lib_standard.gradle" android { - namespace 'com.example.lib_encrypt' + namespace 'com.example.lib_encipher' sourceSets{ main{ diff --git a/libs/lib_encrypt/consumer-rules.pro b/libs/lib_encipher/consumer-rules.pro similarity index 100% rename from libs/lib_encrypt/consumer-rules.pro rename to libs/lib_encipher/consumer-rules.pro diff --git a/libs/lib_encipher/libs/arm64-v8a/libencipher.so b/libs/lib_encipher/libs/arm64-v8a/libencipher.so new file mode 100755 index 000000000..017da6653 Binary files /dev/null and b/libs/lib_encipher/libs/arm64-v8a/libencipher.so differ diff --git a/libs/lib_encipher/libs/armeabi-v7a/libencipher.so b/libs/lib_encipher/libs/armeabi-v7a/libencipher.so new file mode 100755 index 000000000..b99d083bb Binary files /dev/null and b/libs/lib_encipher/libs/armeabi-v7a/libencipher.so differ diff --git a/libs/lib_encipher/libs/x86/libencipher.so b/libs/lib_encipher/libs/x86/libencipher.so new file mode 100755 index 000000000..7806d5de5 Binary files /dev/null and b/libs/lib_encipher/libs/x86/libencipher.so differ diff --git a/libs/lib_encrypt/libs/x86_64/libencrypt.so b/libs/lib_encipher/libs/x86_64/libencipher.so similarity index 62% rename from libs/lib_encrypt/libs/x86_64/libencrypt.so rename to libs/lib_encipher/libs/x86_64/libencipher.so index d563b1384..44b3e1031 100755 Binary files a/libs/lib_encrypt/libs/x86_64/libencrypt.so and b/libs/lib_encipher/libs/x86_64/libencipher.so differ diff --git a/libs/lib_encrypt/proguard-rules.pro b/libs/lib_encipher/proguard-rules.pro similarity index 100% rename from libs/lib_encrypt/proguard-rules.pro rename to libs/lib_encipher/proguard-rules.pro diff --git a/libs/lib_encrypt/src/main/AndroidManifest.xml b/libs/lib_encipher/src/main/AndroidManifest.xml similarity index 100% rename from libs/lib_encrypt/src/main/AndroidManifest.xml rename to libs/lib_encipher/src/main/AndroidManifest.xml diff --git a/libs/lib_encrypt/src/main/java/com/example/lib_encrypt/EncryptLib.kt b/libs/lib_encipher/src/main/java/com/secure/encipher/EncipherLib.kt similarity index 93% rename from libs/lib_encrypt/src/main/java/com/example/lib_encrypt/EncryptLib.kt rename to libs/lib_encipher/src/main/java/com/secure/encipher/EncipherLib.kt index 470003988..e7a715f9e 100644 --- a/libs/lib_encrypt/src/main/java/com/example/lib_encrypt/EncryptLib.kt +++ b/libs/lib_encipher/src/main/java/com/secure/encipher/EncipherLib.kt @@ -1,11 +1,11 @@ -package com.example.lib_encrypt +package com.secure.encipher import java.util.regex.Pattern -object EncryptLib { +object EncipherLib { init { - System.loadLibrary("encrypt") + System.loadLibrary("encipher") } fun encryptText(enc: String, key: String): String { diff --git a/libs/lib_encrypt/libs/arm64-v8a/libencrypt.so b/libs/lib_encrypt/libs/arm64-v8a/libencrypt.so deleted file mode 100755 index 5c071c858..000000000 Binary files a/libs/lib_encrypt/libs/arm64-v8a/libencrypt.so and /dev/null differ diff --git a/libs/lib_encrypt/libs/armeabi-v7a/libencrypt.so b/libs/lib_encrypt/libs/armeabi-v7a/libencrypt.so deleted file mode 100755 index 5a29826d8..000000000 Binary files a/libs/lib_encrypt/libs/armeabi-v7a/libencrypt.so and /dev/null differ diff --git a/libs/lib_encrypt/libs/x86/libencrypt.so b/libs/lib_encrypt/libs/x86/libencrypt.so deleted file mode 100755 index a30a7ae46..000000000 Binary files a/libs/lib_encrypt/libs/x86/libencrypt.so and /dev/null differ diff --git a/settings.gradle b/settings.gradle index 4d49d5814..c7099d3cd 100644 --- a/settings.gradle +++ b/settings.gradle @@ -10,4 +10,4 @@ include ':modules:module_base' include ':libs:lib_core' include ':libs:lib_utils' include ':libs:lib_crop' -include ':libs:lib_encrypt' +include ':libs:lib_encipher'