openssl_cipher_iv_length
(PHP 5 >= 5.3.3, PHP 7, PHP 8)
openssl_cipher_iv_length — 获取密码iv长度
返回值
成功,返回密码长度, 失败返回 false .
错误/异常
当密码方法未知时,抛出一个E_WARNING 级的错误。
示例
示例 #1 openssl_cipher_iv_length() 范例
<?php
$method = 'AES-128-CBC';
$ivlen = openssl_cipher_iv_length($method);
echo $ivlen;
?>以上示例的输出类似于:
16
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
