You are here

function decrypt in Encrypt 7.2

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

Decrypt text.

Parameters

string $text: Text to decrypt.

array $options: Array of options for decryption.

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 Decrypted text.

5 calls to decrypt()
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.
6 string references to 'decrypt'
encrypt_encryption_methods_basic in plugins/encryption_methods/default.inc
Callback for Encrypt implementation: default.
_encrypt_decrypt in includes/encrypt.encrypt.inc
Private internal function to Encrypt and Decrypt text.
_encrypt_encryption_methods_mcrypt_aes_cbc in plugins/encryption_methods/mcrypt_aes_cbc.inc
Callback for Encrypt implementation: Mcrypt AES in CBC mode.
_encrypt_encryption_methods_mcrypt_rij_256 in plugins/encryption_methods/mcrypt_rij_256.inc
Callback for Encrypt implementation: Mcrypt Rijndael 256.
_encrypt_encryption_methods_openssl in plugins/encryption_methods/openssl.inc
Callback for Encrypt implementation: OpenSSL.

... See full list

File

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

Code

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