django-rest-crypto

Crypto Middleware for DjangoRestFramework


License
BSD-3-Clause
Install
pip install django-rest-crypto==1.0.0

Documentation

Crypto Middleware for DjangoRestFramework

Installation

python3 -m pip install django_rest_crypto

Usage

# settings.py

MIDDLEWARE += [
    'django_rest_crypto.middlewares.EncryptDataMiddleware',
]


ENCRYPT_KEY = b'1234567890ABCDEF'    # 16, 24 or 32 bytes, required
ENCRYPT_MODE = 'CBC'                # default

ENCRYPT_IV = b'1234567890ABCDE'     # optional
ENCRYPT_NONCE = b'1234567890ABCDE'  # optional