Provides an AES field for Django that works with MySQL to do the AES encryption and decryption in the database.
See: https://dev.mysql.com/doc/refman/5.5/en/encryption-functions.html#function_aes-decrypt
Credit:
Kumar McMillan did a lot of this work.
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.
Metadata
Release files for django-mysql-aesfield 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-mysql-aesfield-0.2.1.tar.gz | 4.1 kB | Details |
Release files / django-mysql-aesfield-0.2.1.tar.gz
| Download URL | django-mysql-aesfield-0.2.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e95adf68806a1f625d215ebd9efa6a82288c3c3a16b89110a79a23c3092f511
|
|
BLAKE2b-256 checksum How to use checksums |
33cc0f36407fbf71f038cb0b9f9753e265e84788cfcf7b5465d63ef4b44dcf72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |