Django Model Field that supports AES encryption
Project description
AES Field
=============
Provides an AES field for Django that does AES encryption and decryption
using `m2secret-py3`_, a Python wrapper for OpenSSL.
.. _M2Crypto: https://pypi.python.org/pypi/m2secret-py3
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*.
=============
Provides an AES field for Django that does AES encryption and decryption
using `m2secret-py3`_, a Python wrapper for OpenSSL.
.. _M2Crypto: https://pypi.python.org/pypi/m2secret-py3
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
django-aesfield-1.1.tar.gz
(5.0 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 django-aesfield-1.1.tar.gz.
File metadata
- Download URL: django-aesfield-1.1.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9714481aa9ec74a20e79359dd88b819893028defa0b17afe68161b76bdc052d9
|
|
| MD5 |
b7e9fc9417c3369de1be33f0e70b8f23
|
|
| BLAKE2b-256 |
081e6c20e8092d0083275d2461942a5c2106dc5d04e8db0875ed8a10d9a0ce5c
|
File details
Details for the file django_aesfield-1.1-py3-none-any.whl.
File metadata
- Download URL: django_aesfield-1.1-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2552f2cb5f121883c928c4b854a0f9c23ef030dadd3d9a5a7e1f4ac11f456f3
|
|
| MD5 |
32ee296d380082dd5bff80c728f107f3
|
|
| BLAKE2b-256 |
60d955066450a130800c19e2ec238c445f1aad541718fa72abea9522057cb237
|