Adds options to encrypt field values.
The goal of this module is to create a method for encrypting and decrypting field values when stored in the database.
This module depends on the Encrypt module for encrypting and decrypting strings.
Install this module like any other module. Field encryption settings are made on the field edit page.
Original code created by adaddinsane
Known Issues
Drupal 11.1 and 11.2 require 4.0.x
Drupal 11.1 made several changes to the hooks system, which required us to rewrite this module (the 4.x branch).
Drupal 11.3+ requires 4.1.x
Drupal 11.3 made some more changes to the hooks system, so you will need to update to 4.1+.
No views filter support
Since the field data is encrypted these field values will not work with Views Filters, regular, exposed or contextual. See more discussion in this issue.
No entity query constraint support (e.g., UniqueField)
Because of the way this module is implemented, field constraints that rely on an entity query (e.g., UniqueField) will not work (the values of the fields cannot be checked by the entity query). For more information, see this issue: Field Encryption prevents UniqueField from working as intended.
Bundle fields created with ContentEntityBase::bundleFieldDefinitions() are not supported
Bundle fields created via Field UI module can be encrypted, but bundle fields created with ContentEntityBase::bundleFieldDefinitions() are not currently supported.
Incompatible modules
Important
Since this is module deals with encryption of data, which is presumably sensitive data, use the DEV, ALPHA, and BETA versions with extreme caution.
Project information
- Project categories: Security, Site structure
- Ecosystem: Encrypt
2,643 sites report using this module
- Created by tedbow on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
first release with support for Drupal 11.3
Development version: 4.x-dev updated 9 Dec 2025 at 11:05 UTC
