openssl_cipher_key_length
Function • Added in PHP 8.2
Gets the cipher key length.
openssl_cipher_key_length Function synopsis
openssl_cipher_key_length(string $cipher_algo): int|false
Parameters
$cipher_algo
Typestring
The cipher method, see openssl_get_cipher_methods for a list of potential values.
Return value
Typeint|false
Returns the cipher length on success, or false on failure.
Changes to the openssl_cipher_key_length Function
PHP 8.2
- Function added
openssl_cipher_key_length Function Availability
openssl_cipher_key_length Function Availability| PHP Version | Availability |
|---|---|
| PHP 8.6Upcoming Release | Yes |
| PHP 8.5Supported (Latest) | Yes |
| PHP 8.4Supported | Yes |
| PHP 8.3Security-Fixes Only | Yes |
| PHP 8.2Security-Fixes Only | Yes |
| PHP 8.1Unsupported | No |
| PHP 8.0Unsupported | No |
| PHP 7.4Unsupported | No |
| PHP 7.3Unsupported | No |
| PHP 7.2Unsupported | No |
| PHP 7.1Unsupported | No |
| PHP 7.0Unsupported | No |
| PHP 5.6Unsupported | No |
| PHP 5.5Unsupported | No |
| PHP 5.4Unsupported | No |
| PHP 5.3Unsupported | No |