openssl_cipher_iv_length

(PHP 5 >= 5.3.3, PHP 7)

openssl_cipher_iv_length锟斤拷取锟斤拷锟斤拷iv锟斤拷锟斤拷

说锟斤拷

openssl_cipher_iv_length ( string $method ) : int

锟斤拷取锟斤拷锟斤拷锟绞硷拷锟斤拷锟斤拷锟�(iv)锟斤拷锟饺★拷

锟斤拷锟斤拷

method

锟斤拷锟斤拷姆锟斤拷锟斤拷锟斤拷锟斤拷锟街碉拷榭� openssl_get_cipher_methods() 锟斤拷锟斤拷锟斤拷

锟斤拷锟斤拷值

锟缴癸拷锟斤拷锟斤拷锟斤拷锟斤拷锟诫长锟斤拷, 失锟杰凤拷锟斤拷 FALSE .

锟斤拷锟斤拷锟届常

锟斤拷锟斤拷锟诫方锟斤拷未知时锟斤拷锟阶筹拷一锟斤拷E_WARNING 锟斤拷锟侥达拷锟斤拷

锟斤拷锟斤拷

Example #1 openssl_cipher_iv_length() 锟斤拷锟斤拷

<?php
$method 
'AES-128-CBC';
$ivlen openssl_cipher_iv_length($method);

echo 
$ivlen;
?>

锟斤拷锟斤拷锟斤拷锟教碉拷锟斤拷锟斤拷锟斤拷锟斤拷冢锟�

16