public function OpenSSL::getCipherMethods 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::getCipherMethods()
Get a list of available cipher methods.
Return value
array List of methods.
Overrides BaseMethodInterface::getCipherMethods
File
- src/
Crypt/ Method/ OpenSSL.php, line 67
Class
- OpenSSL
- Provides OpenSSL encryption functionality.
Namespace
Drupal\drd_agent\Crypt\MethodCode
public function getCipherMethods() : array {
$result = [];
$available = openssl_get_cipher_methods();
foreach ($this->supportedCipher as $cipher => $keyLength) {
if (in_array($cipher, $available, TRUE)) {
$result[$cipher] = $cipher;
}
}
return $result;
}