public function EncryptionMethodInterface::decrypt in Encrypt 8.3
Decrypt text.
Parameters
string $text: The text to be decrypted.
string $key: The key to decrypt the text with.
Return value
string The decrypted text
Throws
\Drupal\encrypt\Exception\EncryptException Thrown when decryption fails.
\Drupal\encrypt\Exception\EncryptionMethodCanNotDecryptException The method should throw this exception when the plugin can not decrypt (i.e. use a public key).
3 methods override EncryptionMethodInterface::decrypt()
- AsymmetricalEncryptionMethod::decrypt in tests/
modules/ encrypt_test/ src/ Plugin/ EncryptionMethod/ AsymmetricalEncryptionMethod.php - Decrypt text.
- ConfigTestEncryptionMethod::decrypt in tests/
modules/ encrypt_test/ src/ Plugin/ EncryptionMethod/ ConfigTestEncryptionMethod.php - Decrypt text.
- TestEncryptionMethod::decrypt in tests/
modules/ encrypt_test/ src/ Plugin/ EncryptionMethod/ TestEncryptionMethod.php - Decrypt text.
File
- src/
EncryptionMethodInterface.php, line 47
Class
- EncryptionMethodInterface
- Provides an interface for EncryptionMethod plugins.
Namespace
Drupal\encryptCode
public function decrypt($text, $key);