Closed ghost closed 9 years ago
The encrypted fields assume that the data in the db is encrypted. So if it pulls some plaintext out of the database, it will be treated as cyphertext, which will turn it into gidderish.
I would recommend a data-migration strategy. There would be three migrations needed.
After running those, you should have all your old data safely encrypted in the new field.
Thanks for making this. Worked like a charm, but I noticed an unexpected issue when i started using the app. I had a previously unencrypted
CharField
offirst_name
andlast_name'
I installed django-encrypted field and updated my model using theEncryptedCharField
. When I enter new data, everything appears as I expected: The view shows me the unencrypted first_name and last_name while the database shows the fields encrypted.However, with the data that was already entered, the view shows the encrypted fields as they appear on the database - basically gibberish. Is there anything that can be done about this? I'm working with a local version, but want to update the deployed version with the encrypted fields, but I'm a bit concerned that I would freak out users because of the above issue.