public function OpenSSL::encrypt in DRD Agent 4.0.x
Same name and namespace in other branches
- 8.3 src/Crypt/Method/OpenSSL.php \Drupal\drd_agent\Crypt\Method\OpenSSL::encrypt()
Encrypt and encode any list of arguments.
Parameters
array $args: The arguments to be encrpyted.
Return value
string Encrypted and base64 encoded serialisation of the arguments.
Overrides BaseMethodInterface::encrypt
File
- src/
Crypt/ Method/ OpenSSL.php, line 97
Class
- OpenSSL
- Provides OpenSSL encryption functionality.
Namespace
Drupal\drd_agent\Crypt\MethodCode
public function encrypt(array $args) : string {
return empty($this->password) ? '' : openssl_encrypt(serialize($args), $this->cipher, $this
->getPassword(), OPENSSL_RAW_DATA, $this
->getIv());
}