Skip to content

Instantly share code, notes, and snippets.

@dinorahto
Last active January 9, 2021 23:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dinorahto/a18df45da94d1e45eeeb3daa8e3a0be6 to your computer and use it in GitHub Desktop.
Save dinorahto/a18df45da94d1e45eeeb3daa8e3a0be6 to your computer and use it in GitHub Desktop.
// Release Candidate Option
val sharedPreferences = EncryptedSharedPreferences.create(
"FileName",
masterKeyAlias,
context,
EncryptedSharedPreferences.PrefKeyEncryptionScheme.AES256_SIV,
EncryptedSharedPreferences.PrefValueEncryptionScheme.AES256_GCM
)
// Alpha Option
val sharedPreferences = EncryptedSharedPreferences.create(
context,
"File Name",
masterKeyAlias,
EncryptedSharedPreferences.PrefKeyEncryptionScheme.AES256_SIV,
EncryptedSharedPreferences.PrefValueEncryptionScheme.AES256_GCM
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment