This is an API-only module; it does not provide any new functionality in the Drupal user interface or menu system. You will likely only need to install it if it is required by another module, or you wish to use it from your own custom PHP code.
This module provides the following two API functions:
xor_encryption_encrypt($value, $radix, $numPadDigits, $key)– uses exclusive disjunction / exclusive-OR to encrypt the specified value in the specified radix/base (i.e. 10 for decimal, 16 for hexadecimal, etc), using the specified number of padding digits, and the specified encryption key.
xor_encryption_decrypt($value, $radix, $numPadDigits, $key)– uses exclusive disjunction / exclusive-OR to decrypt a value that was encrypted with
xor_encryption_encrypt(); the parameters for radix, number of padding digits, and key must exactly match what was supplied to
xor_encryption_encrypt()for the value to be decrypted properly.
This module provides a lightweight way to encrypt and decrypt sensitive values or data. The API functions use the Open Publishing Lab's
XorEncryptor class under the hood, which uses the GNU gmp library so that it is safe for values of any bit-length.
DISCLAIMER: This module should not be trusted with classified or extremely sensitive information. It is intended for somewhat trivial / lightweight encryption of short strings of text. There are areas for improvement in how keys are generated and used that can make it a weak solution for more substantial use cases.