protected function TfaBasePlugin::decrypt in Two-factor Authentication (TFA) 8
Decrypt a encrypted string.
Should be used when reading codes from storage.
Parameters
string $data: The string to be decrypted.
Return value
string The decrypted string.
Throws
\Drupal\encrypt\Exception\EncryptionMethodCanNotDecryptException
\Drupal\encrypt\Exception\EncryptException
2 calls to TfaBasePlugin::decrypt()
- TfaRecoveryCode::getCodes in src/
Plugin/ TfaValidation/ TfaRecoveryCode.php - Get unused recovery codes.
- TfaTestValidationPluginSetupPlugin::getExpectedFieldData in tests/
modules/ tfa_test_plugins/ src/ Plugin/ TfaSetup/ TfaTestValidationPluginSetupPlugin.php - Get and decode the data expected during setup.
File
- src/
Plugin/ TfaBasePlugin.php, line 204
Class
- TfaBasePlugin
- Base plugin class.
Namespace
Drupal\tfa\PluginCode
protected function decrypt($data) {
return $this->encryptService
->decrypt($data, $this->encryptionProfile);
}