(PHP 8 >= 8.2.0)
openssl_cipher_key_length — 获取密码密钥长度
cipher_algo
密码方法,请参阅 openssl_get_cipher_methods() 获取可能的取值列表。
示例 #1 openssl_cipher_key_length() 示例
<?php
$method = 'AES-128-CBC';
var_dump(openssl_cipher_key_length($method));
?>
以上示例的输出类似于
int(16)