dc

django-cryptography

Easily encrypt data in Django

Showing:

Popularity

Downloads/wk

0

GitHub Stars

230

Maintenance

Last Commit

2yrs ago

Contributors

2

Package

Dependencies

2

License

BSD

Categories

Readme

Django Cryptography

A set of primitives for easily encrypting data in Django, wrapping the Python Cryptography library. Also provided is a drop in replacement for Django's own cryptographic primitives, using Cryptography as the backend provider.

Do not forget to read the documentation_.

.. START HIDDEN .. image:: https://img.shields.io/travis/georgemarshall/django-cryptography/master.svg :target: https://travis-ci.org/georgemarshall/django-cryptography :alt: Builds .. image:: https://img.shields.io/codecov/c/github/georgemarshall/django-cryptography/master.svg :target: https://codecov.io/gh/georgemarshall/django-cryptography/branch/master :alt: Code coverage .. END HIDDEN

Cryptography by example

Using symmetrical encryption to store sensitive data in the database. Wrap the desired model field with encrypt to easily protect its contents.

.. code-block:: python

from django.db import models

from django_cryptography.fields import encrypt

class MyModel(models.Model): name = models.CharField(max_length=50) sensitive_data = encrypt(models.CharField(max_length=50))

The data will now be automatically encrypted when saved to the database. encrypt uses an encryption that allows for bi-directional data retrieval.

Requirements

  • Python_ (3.5, 3.6, 3.7, 3.8)
  • Cryptography_ (2.0+)
  • Django_ (1.11, 2.2, 3.0)

Installation

.. code-block:: console

pip install django-cryptography

.. _Cryptography: https://cryptography.io/ .. _Django: https://www.djangoproject.com/ .. _Python: https://www.python.org/ .. _documentation: https://django-cryptography.readthedocs.io/en/latest/

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100