public function MCrypt::encrypt in DRD Agent 4.0.x
Same name and namespace in other branches
- 8.3 src/Crypt/Method/MCrypt.php \Drupal\drd_agent\Crypt\Method\MCrypt::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/ MCrypt.php, line 88
Class
- MCrypt
- Provides MCrypt encryption functionality.
Namespace
Drupal\drd_agent\Crypt\MethodCode
public function encrypt(array $args) : string {
return mcrypt_encrypt($this->cipher, $this
->getPassword(), serialize($args), $this->mode, $this
->getIv());
}