You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Please remember that no client-side security measures are invincible. As a rule of thumb, **storing secrets in a mobile app is not considered best practice**. However, when there's no other option, this method is our best recommendation for concealing them.
13
13
14
-
# 1) Getting started
14
+
# 1) Getting Started
15
15
16
16
To use the Secrets Vault Plugin in your Android project, follow these steps:
17
17
@@ -37,7 +37,7 @@ plugins {
37
37
}
38
38
```
39
39
40
-
# 2) Keep secrets in your project
40
+
# 2) Keep Secrets in Your Project
41
41
42
42
To keep secrets in your project, you can add them to a JSON file located in the root folder of the module where you've applied the plugin.
43
43
Follow the format below:
@@ -81,7 +81,7 @@ secretsVault {
81
81
- The `projectName` parameter is optional and uses the module's name where the plugin is applied by default. You can specify a different project name if needed.
82
82
- The `version` parameter is optional. If not provided, a default CMake version will be used.
83
83
84
-
# 3) Get your secret key in your app
84
+
# 3) Get Your Secret Key in Your App
85
85
To enable the compilation of C++ files, add these lines in the Module level `build.gradle[.kts]` :
86
86
```gradle
87
87
android {
@@ -101,7 +101,7 @@ Access your secret key by calling :
101
101
val key =MainSecrets().getYourSecretKeyName()
102
102
```
103
103
104
-
# 4) Flavor-specific secrets (Optional)
104
+
# 4) Flavor-specific Secrets (Optional)
105
105
If you are working on multi-flavor projects and have flavor-specific secrets, you need to pass arguments to CMake in your `build.gradle[.kts]` file. Follow the steps below:
106
106
107
107
```gradle
@@ -207,7 +207,7 @@ android {
207
207
```
208
208
Remember to replace version in -Dversion=flavorName with the appropriate cmakeArgument from your JSON. The flavorName should correspond to the specific product flavor you're building for.
209
209
210
-
# 6) Enhance your secrets security (Optional)
210
+
# 6) Enhance Your Secrets' Security (Optional)
211
211
To enhance the security of your secrets, you can create a custom encoding/decoding algorithm. The secrets will be stored in C++ and further secured by applying your custom encoding algorithm. Additionally, the decoding algorithm will be compiled, making it more challenging for an attacker to reverse-engineer and obtain your keys.
0 commit comments