titanium-sdk icon indicating copy to clipboard operation
titanium-sdk copied to clipboard

Enable support for EncryptedSharedPreferences

Open jonasfunk opened this issue 1 year ago • 1 comments

I have searched and made sure there are no existing issues for the issue I am filing

  • [X] I have searched the existing issues

Description

We've had white hat hackers test our system for vulnerabilities. One of the things they pointed out was the current use of "SharedPreferences" (Ti.App.properties).

Solution

The hackers suggested we should use "EncryptedSharedPreferences" instead. https://developer.android.com/reference/androidx/security/crypto/EncryptedSharedPreferences.

Alternatives

No response

Platforms

Android

jonasfunk avatar Jun 13 '23 12:06 jonasfunk

already made some progress here :)

Screenshot_20230618_142738

It will store value2 inside the secret_share_prefs.xml file. The other value is stored in the normal titanium.xml

Just have to see if it should be a different setString like setStringSecure() so you could use both or if this way is better but then (at the moment) you can't get both values

m1ga avatar Jun 18 '23 12:06 m1ga