xor.png

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 OplEncryptor class under the hood, which uses the GNU gmp library so that it is safe for values of any bit-length.

This module is part of the meetü Game Platform from the Open Publishing Lab @ RIT.

Project Information

  • Maintenance status: Unknown
  • Development status: Unknown
  • Downloads: 680
  • Last modified: May 11, 2012

Downloads