Browse Source

增加stringfog

zk 1 year ago
parent
commit
6a9f4cfba8
1 changed files with 16 additions and 1 deletions
  1. 16 1
      app/build.gradle

+ 16 - 1
app/build.gradle

@@ -1,6 +1,7 @@
 plugins {
     id 'com.android.application'
     id 'dagger.hilt.android.plugin'
+    id 'stringfog'
 }
 
 android {
@@ -41,7 +42,7 @@ android {
             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
             signingConfig signingConfigs.release
 
-            buildConfigField "boolean", "isLocalNetwork", "false"
+            buildConfigField "boolean", "isLocalNetwork", "true"
             buildConfigField "String", "HOST", "\"$prod_host\""
             buildConfigField "String", "WECHAT_APP_ID", "\"$wechat_app_id\""
             buildConfigField "String", "WECHAT_KF_ID", "\"$wechat_kf_id\""
@@ -100,6 +101,17 @@ android {
     }
 }
 
+import com.github.megatronking.stringfog.plugin.kg.RandomKeyGenerator
+
+stringfog {
+    implementation 'com.github.megatronking.stringfog.xor.StringFogImpl'
+    fogPackages = ['com.datarecovery.master']
+    debug false
+    enable true
+    kg new RandomKeyGenerator()
+    mode base64
+}
+
 dependencies {
     //jar or aar
     implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
@@ -155,6 +167,9 @@ dependencies {
     implementation "com.gyf.immersionbar:immersionbar:$rootProject.immersionbar_version"
     implementation "com.gyf.immersionbar:immersionbar-components:$rootProject.immersionbar_version"
 
+    //字符串加密算法
+    implementation "com.github.megatronking.stringfog:xor:$rootProject.stringfog_verstion"
+
     //RefreshLayout
     implementation "androidx.swiperefreshlayout:swiperefreshlayout:$rootProject.swiperefreshlayout_version"