重命名加密模块相关代码
This commit is contained in:
@@ -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()
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
apply from : "../lib_standard.gradle"
|
||||
|
||||
android {
|
||||
namespace 'com.example.lib_encrypt'
|
||||
namespace 'com.example.lib_encipher'
|
||||
|
||||
sourceSets{
|
||||
main{
|
BIN
libs/lib_encipher/libs/arm64-v8a/libencipher.so
Executable file
BIN
libs/lib_encipher/libs/arm64-v8a/libencipher.so
Executable file
Binary file not shown.
BIN
libs/lib_encipher/libs/armeabi-v7a/libencipher.so
Executable file
BIN
libs/lib_encipher/libs/armeabi-v7a/libencipher.so
Executable file
Binary file not shown.
BIN
libs/lib_encipher/libs/x86/libencipher.so
Executable file
BIN
libs/lib_encipher/libs/x86/libencipher.so
Executable file
Binary file not shown.
Binary file not shown.
@@ -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 {
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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'
|
||||
|
Reference in New Issue
Block a user