This module adds the "encrypted settings" field through Field API, which has the following two features:

  • The field can be encrypted before saving to the database
  • The field can be validated to follow INI format

This module is ideal to save credential settings information, such as a "Credit Card" field to add to users' profile. For example, the following credit card info:

card_holder_name="John Wayne"
card_holder_address="123 South St., Ann Arbor, MI"

would be save to the database as:


Note that this field is intended to work with plain text. It doesn't go through any input filters. See #1139994: Rename module to Encrypted Field?. In addition, this module is best to encrypt INI-style settings. To encrypt existing field (could be any type), please see

You need to install the PHP mcrypt library in order to use the encryption feature. Also, you need to add $mcrypt_secret_key="..." in settings.php file. Otherwise, the first 6 characters of $drupal_hash_salt in settings.php would be used as the secret key for encryption purpose.

Note: The encryption method used in this module has limitation on the lenghth of secret key. For higher level of security, please see #1136440: Integration with "AES" or "Encryption" module. For even higher level of security, please enable https:

This module is developed by Daniel Zhou from Michiza Computing

Project Information