重命名加密模块相关代码

This commit is contained in:
max
2024-03-04 14:31:55 +08:00
parent 9bc58277aa
commit 7b4bb010bf
16 changed files with 10 additions and 10 deletions

View File

@@ -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()

View File

@@ -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);
}
}

View File

@@ -1,7 +1,7 @@
apply from : "../lib_standard.gradle"
android {
namespace 'com.example.lib_encrypt'
namespace 'com.example.lib_encipher'
sourceSets{
main{

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -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 {

View File

@@ -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'