You are here

function encrypt in Encrypt 7

Same name and namespace in other branches
  1. 6 encrypt.module \encrypt()
  2. 7.3 encrypt.module \encrypt()
  3. 7.2 encrypt.module \encrypt()

Encrypt

Encrypt text.

Parameters

$text: Text to encrypt

$options: Array of options for encryption

$method: String name of method to use. Uses setting default if NULL

Return value

A serialized array containing the encrypted text and encryption method.

4 calls to encrypt()
EncryptEncryptDecryptTest::testBasicEncryptDecrypt in ./encrypt.test
Test encryption and decryption with the "Basic" method.
EncryptEncryptDecryptTest::testMCryptEncryptDecrypt in ./encrypt.test
Test encryption and decryption with the "MCrypt" method.
EncryptEncryptDecryptTest::testNoneEncryptDecrypt in ./encrypt.test
Test encryption and decryption with the "None" method.
EncryptKeyHandling::testDefaultKey in ./encrypt.test
Ensure that, if no key path is set, drupal_private_key is used.
11 string references to 'encrypt'
EncryptEncryptDecryptTest::setUp in ./encrypt.test
Enable encrypt module.
EncryptEncryptionMethodHooksTest::setUp in ./encrypt.test
Enable encrypt module.
EncryptKeyHandling::setUp in ./encrypt.test
Sets up a Drupal site for running functional and integration tests.
encrypt_admin_settings in includes/encrypt.admin.inc
Menu callback; displays the encrypt module settings page.
encrypt_admin_settings_validate in includes/encrypt.admin.inc
Validate form function for encrypt_admin_settings(). Checks if users really wants to change path, and whether key can be written.

... See full list

File

./encrypt.module, line 146
Main Encrypt Drupal File

Code

function encrypt($text = '', $options = array(), $method = NULL, $key_name = NULL) {
  encrypt_initialize();
  return _encrypt_decrypt('encrypt', $text, $options, $method, $key_name);
}