Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DexGuard: how to specify string encryption

I am trying to get a basic understanding of how to specify string encryption using the command -encryptstring in the file dexguard-project.txt. For example, I see

-encryptstrings "android.content.pm.PackageInfo", 
"packageName",
"versionName",
"versionCode",
............ ,
"java.lang.String",
............

What does it mean?

like image 428
Monica Avatar asked Feb 23 '26 16:02

Monica


1 Answers

There's good example of the options in the DexGuard docs {dexgaurd root}/samples/StringEncryption/dexguard-project.txt

Here's the ones I tend to use.

#encrypt a specific string in a class
-encryptstrings class com.example.HelloWorldActivity {
    private static final java.lang.String MESSAGE;
}

#encrypt all strings in the class.
-encryptstrings class com.example.HelloWorldActivity

#specify the string itself, i.e any instance of "Hello world!" in your app. 
-encryptstrings "Hello world!"
like image 86
scottyab Avatar answered Feb 25 '26 04:02

scottyab



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!