Created
June 4, 2022 00:07
-
-
Save ed-george/29ff79b92569c4de1543222b95ff2465 to your computer and use it in GitHub Desktop.
Unpacking Android Security: Part 2 - Insecure Data Storage (Example 2)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val masterKey = MasterKey.Builder(this) | |
.setKeyScheme(MasterKey.KeyScheme.AES256_GCM) | |
.build() | |
EncryptedSharedPreferences.create(this, "myEncryptedPrefsFile", masterKey, PrefKeyEncryptionScheme.AES256_SIV, PrefValueEncryptionScheme.AES256_GCM).edit { | |
putString("mySecretKey", "mySecretValue") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment