Middleware for encrypting and decrypting requests and responses in Django Rest Framework
Project description
c9lab-security
This package provides middleware for encrypting and decrypting requests and responses in Django Rest Framework.
Installation
pip install c9lab-security
MIDDLEWARE = [
...,
'c9lab_security.middleware.DecryptRequestMiddleware',
'c9lab_security.middleware.EncryptResponseMiddleware',
]
# Set the encryption key
from c9lab_security.encryption_utility import EncryptionUtility
EncryptionUtility.set_key(b'your-16-byte-key') # Use a 16, 24, or 32 byte key
Ensure your requests and responses use the application/json content type and include the encrypted data under the statistics field.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
c9lab_security-0.2.tar.gz
(2.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file c9lab_security-0.2.tar.gz.
File metadata
- Download URL: c9lab_security-0.2.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42e887d3e299fd8264480ef4e13eb18281ca87e58e19cb9a14a5f0bc0b9c02c8
|
|
| MD5 |
731c1c0196ee31cc848378ac4bc14234
|
|
| BLAKE2b-256 |
e83a0091c7e8dabbcd138dde3c8aa799f558d8ea3b22f3629fd85296ff64fd87
|
File details
Details for the file c9lab_security-0.2-py3-none-any.whl.
File metadata
- Download URL: c9lab_security-0.2-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea1e13c2cc6b6599f65977bcd73a41a43ae09dc3f924d1797ab358abf2d911ad
|
|
| MD5 |
3e9faeda0365ebc9e9bc5069dc146703
|
|
| BLAKE2b-256 |
11fbc3a73a3c6c4d2bc1278aaf7a711a98315ed58f8f95e379b9982e3addc1d3
|