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.3.tar.gz
(2.6 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.3.tar.gz.
File metadata
- Download URL: c9lab_security-0.3.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db66db42047e93c1ead26ac9fedb3f6b768052384e8bbb0b03af27ae83469bc8
|
|
| MD5 |
c621a8c23f762d3409426fd086443829
|
|
| BLAKE2b-256 |
8826431cda2c7769d25b2b61307cc3f279db8abeccfd928452e1793104fd9089
|
File details
Details for the file c9lab_security-0.3-py3-none-any.whl.
File metadata
- Download URL: c9lab_security-0.3-py3-none-any.whl
- Upload date:
- Size: 3.2 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 |
997287b33c13eb3886f43adbf05c260d01a2f8b33e0952f4bc516b70ea08ffd6
|
|
| MD5 |
141d28bcd9515123a48278d3041b5a0d
|
|
| BLAKE2b-256 |
895650cdc4930dad166d036d7f18476fec52ae3ce10a755ffbf9d8d2e6478893
|