You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-24Lines changed: 22 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -11,26 +11,26 @@ This is a collection of Django Model Field classes that are encrypted using [Key
11
11
[Keyczar](http://www.keyczar.org/) is a crypto library that exposes a simple API by letting the user set things like the algorithm and key size right in the keyfile. It also provides for things like expiring old keys and cycling in new ones.
12
12
13
13
#### Getting Started
14
-
15
-
$ pip install django-encrypted-fields
16
-
14
+
```shell
15
+
$ pip install django-encrypted-fields
16
+
```
17
17
Create a basic keyczar keyset. `AES-256` in this case.
Use your model as normal and your data will be encrypted in the database.
35
35
36
36
_Warning:_ Once the data is encrypted, it can no longer to used to query or sort. In SQL, these will all look like text fields with random noise in them (which is what you want).
@@ -50,13 +50,11 @@ Currently build in and unit-tested fields. They have the save APIs as their non-
50
50
#### Encrypt All The Fields!
51
51
52
52
Making new fields is easy! Django Encrypted Fields uses a handy mixin to make upgrading pre-existing fields quite easy.
53
+
```python
54
+
from django.db import models
55
+
from encrypted_fields import EncryptedFieldMixin
53
56
54
-
from django.db import models
55
-
from encrypted_fields import EncryptedFieldMixin
56
-
57
-
class EncryptedIPAddressField(EncryptedFieldMixin, models.IPAddressField):
0 commit comments