Skip to main content

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


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-3.1.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_aesfield-3.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file django-aesfield-3.1.0.tar.gz.

File metadata

  • Download URL: django-aesfield-3.1.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for django-aesfield-3.1.0.tar.gz
Algorithm Hash digest
SHA256 28570499b3619d3174ec07f010b96b411af85b1f2f36fa4496e21e78bf40d09e
MD5 f039aa7b22d78142afd4b08601af0605
BLAKE2b-256 54703230ad11972dc15bac882c1e795df3b34d337c7a5082e26033f5803e268b

See more details on using hashes here.

File details

Details for the file django_aesfield-3.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_aesfield-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 77cc30301a3a30f5c296cf6b4c361e33a0dbc3e6f8ad026006abf302dc41a1fd
MD5 b747da7c5f6a604d15bb199db149a78b
BLAKE2b-256 b42127319d535ddfa34afe25c837f2c5d133b07eec68aebb01c3b5ca67c7ce76

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page