Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

django-aesfield

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-aesfield

Django Model Field that supports AES encryption

  • 4.0.0
  • PyPI
  • Socket score

Maintainers
2

AES Field

Provides an AES field for Django that does AES encryption and decryption using m2secret-py3_, a Python wrapper for OpenSSL.

.. _m2secret-py3: 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.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc