tidev / titanium-sdk

🚀 Native iOS and Android Apps with JavaScript
https://titaniumsdk.com/
Other
2.75k stars 1.21k forks source link

Enable support for EncryptedSharedPreferences #13846

Open jonasfunk opened 1 year ago

jonasfunk commented 1 year ago

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

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

m1ga commented 1 year ago

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