georgemarshall / django-cryptography

Easily encrypt data in Django
https://django-cryptography.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
371 stars 70 forks source link

Add support for custom form field similar to django's ReadOnlyPasswordHashField which hides the value and provides a route to change the value. #34

Open jackton1 opened 4 years ago

jackton1 commented 4 years ago

This is a security enhancement currently only using encrypt allows instant access to the encrypted value which could easily be retrieved and modified introducing another protect route should mitigate this issue.


class MyModel(models.Model):
    encrypted_field = encrypt(models.CharField(max_length=255))