public function EncryptionServiceInterface::encrypt in Encryption 8
Same name and namespace in other branches
- 2.x src/EncryptionServiceInterface.php \Drupal\encryption\EncryptionServiceInterface::encrypt()
Encrypt a value using the encryption key from settings.php.
Parameters
string $value: The value tobe encrypted.
bool $raw_output: Should be set to TRUE if a raw output value is required. Otherwise, a url safe base64 encoded encoded string will be returned.
Return value
string|null A Base64 encoded representation of the encrypted value or null if encryption fails for some reason.
File
- src/
EncryptionServiceInterface.php, line 25
Class
- EncryptionServiceInterface
- Interface EncryptionServiceInterface.
Namespace
Drupal\encryptionCode
public function encrypt($value, $raw_output = FALSE);