Django Model Field that supports AES encryption
Project description
Provides an AES field for Django that does AES encryption and decryption using m2secret-py3, a Python wrapper for OpenSSL.
Usage
Like any other field:
from aesfield.field import AESField class SomeModel(...): key = AESField()
Configuration
AESField takes the following parameters beyond a normal CharField:
aes_prefix: the prefix to use on fields, defaults to aes:
aes_key: the key to use in the lookup method to find a suitable key for this field, defaults to default
Settings:
AES_METHOD: the module to look in for a key lookup method, if you want something different from the default, aesfield.default
AES_KEYS: used by the aesfield.default method. It’s a dictionary of keys to filenames. Those files must be able to be read by the Django process. It must have a default key, unless you specify a specifc one in aes_key
Commands
If you add aesfield to INSTALLED_APPS you’ll get one more command, generate_aes_keys. This will generate a new file for each file mentioned in the AES_KEYS dictionary. But only if that file does not already exist.
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
Built Distribution
Hashes for django_aesfield-4.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c88e7dc063919c4fa2fba6d7c65eb7be05838323ca3adcce76fb687d30d630b |
|
MD5 | 725ed6a07552f610b71bec900aca7e80 |
|
BLAKE2b-256 | 8b99bcb805c97b678c4ff1aa4e7938cfbbc98cde04eb03a2c0621a477c7bfa23 |