You are here

function encrypt in Encrypt 7.3

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

Encrypt text.

Parameters

string $text: Text to encrypt

array $options: Array of options for encryption

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

mixed $key_provider: String name of provider to use. Uses setting default if NULL

mixed $config: A configuration to use. Uses the default configuration if NULL.

Return value

string A serialized array containing the encrypted text and encryption method.

7 calls to encrypt()
EncryptConfigTest::testConfigEncrypt in ./encrypt.test
Test an encryption with just a configuration.
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.
EncryptPortability::testDecryptingRandomValue in ./encrypt.test
Test off-the-cuff decrypting of a value using decrypt() with some text and paramters.

... See full list

20 string references to 'encrypt'
decrypt in ./encrypt.module
Decrypt text.
EncryptConfigTest::setUp in ./encrypt.test
Enable encrypt module; create and log in privileged user.
EncryptEncryptDecryptTest::setUp in ./encrypt.test
Enable encrypt module.
EncryptEncryptionMethodPluginsTest::setUp in ./encrypt.test
Enable encrypt module.
EncryptPortability::setUp in ./encrypt.test
Sets up a Drupal site for running functional and integration tests.

... See full list

File

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

Code

function encrypt($text = '', $options = array(), $method = NULL, $key_provider = NULL, $config = NULL) {
  module_load_include('inc', 'encrypt', 'includes/encrypt.encrypt');
  return _encrypt_decrypt('encrypt', $text, $options, $method, $key_provider, $config);
}