function encrypt in Encrypt 7.2
Same name and namespace in other branches
- 6 encrypt.module \encrypt()
- 7.3 encrypt.module \encrypt()
- 7 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.
6 calls to encrypt()
- EncryptConfigTest::testConfigEncrypt in ./
encrypt.test - Test an encryption with just a configuration.
- EncryptEncryptDecryptTest::testMcryptEncryptDecrypt in ./
encrypt.test - Test encryption and decryption with the "Mcrypt AES (CBC Mode)" 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().
- EncryptPortability::testDecryptWithoutKeyProvider in ./
encrypt.test - Test decrypting when only an encryption method is provided.
24 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 - Enable encrypt module.
File
- ./
encrypt.module, line 589 - Main Encrypt Drupal File.
Code
function encrypt($text = '', array $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);
}