Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(android): use EncryptedSharedPreferences #13848

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Jun 18, 2023

fixes #13846

Adds Ti.App.Properties.useEncryption to store EncryptedSharedPreferences.

Test

Ti.App.Properties.setString("string", "plain value");
console.log("not encrypted - should be 'plain value': " + Ti.App.Properties.getString("string", "default"));

Ti.App.Properties.useEncryption = true;
Ti.App.Properties.setString("string", "secure value");
console.log("encrypted - should be 'secure value': " + Ti.App.Properties.getString("string", "default"));

Ti.App.Properties.useEncryption = false;
Ti.App.Properties.setString("string", "plain value 2");
console.log("not encrypted - should be 'plain value 2': " + Ti.App.Properties.getString("string", "default"));

Ti.App.Properties.useEncryption = true;
console.log("encrypted - should be 'secure value': " + Ti.App.Properties.getString("string", "default"));

Stores the values in an encrypted xml:

Screenshot_20230618_142738

Todo

  • Extend test
  • Docs

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

Successfully merging this pull request may close these issues.

Enable support for EncryptedSharedPreferences
1 participant