The table in the database (sqlite3) will look something like this:
id | date | text 1 | 1.1.1970 | Blablabla I want to add the ability to encrypt data in the database with a password from the user.
Problems:
- If you encrypt the
date, you can not sort the records by date created. - If you encrypt the
text, there will be problems with the search.
How to encrypt records in the database?
UPD
One more question. Suppose the user has forgotten the password that is encrypted data. How to correctly implement password recovery?
Just send a new one to the mail, because It is not suitable for decoding.