Hi,
I would like to encrypt and store data locally on mobile device per user, meaning that only that user can decrypt the data.
For this, I guess I should use user credentials (username + password) to encrypt the data. Please note that all users are forced to use strong passwords.
Whenever data is updated, received from server, it shall be updated locally, encrypted.
This implicates that I need to keep user credentials all the time in memory, which I do not want, since somebody can dump application and find those credentials.
What I could do is to calculate SHA256 of combination of user credentials and keep only that hash in memory, and use that hash as encryption key.
Any ideas regarding this?
I would like to encrypt and store data locally on mobile device per user, meaning that only that user can decrypt the data.
For this, I guess I should use user credentials (username + password) to encrypt the data. Please note that all users are forced to use strong passwords.
Whenever data is updated, received from server, it shall be updated locally, encrypted.
This implicates that I need to keep user credentials all the time in memory, which I do not want, since somebody can dump application and find those credentials.
What I could do is to calculate SHA256 of combination of user credentials and keep only that hash in memory, and use that hash as encryption key.
Any ideas regarding this?

