Skip to content

Conversation

cpholguera
Copy link
Collaborator

Introduce a demonstration of securely storing sensitive data in an Android app using the EncryptedSharedPreferences class. The demo includes sample code, steps for execution, and validation of data encryption.

@cpholguera cpholguera changed the title Add demo for securely storing sensitive data using EncryptedSharedPreferences Add MASTG-DEMO-0060 for securely storing sensitive data using EncryptedSharedPreferences Jul 20, 2025
@@ -0,0 +1,2 @@
#!/bin/bash
../../../../frida/android/run.sh ./hooks.js
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Path changed for due to changes in #3359:

#!/bin/bash
../../../../utils/frida/android/run.sh ./hooks.js


{{ MastgTest.kt }}

### Steps
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EncryptedSharedPreferences are part of the AndroidX and must be added to the dependencies. Should this be part of the demo, or do we describe it here in the step-by-step instructions?

note: This demo shows how to store sensitive data securely in the app sandbox using the EncryptedSharedPreferences class.
---

### Sample
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, EncryptedSharedPreferences is deprecated.

https://proandroiddev.com/securing-the-future-navigating-the-deprecation-of-encrypted-shared-preferences-91ce3c20ae8d

Would it make sense to mention that here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants