Articles About the PHP Function OpenSSL-Cipher-IV-Length
Articles about php function openssl_cipher_iv_length
OpenSSL is a robust, general-purpose cryptography library. It provides functions for asymmetric encryption and decryption, PKCS7, PBKDF2, EC curve cryptography, X509 certificate handling and more. Its source code is available under an Apache-style license, and it can be used for both commercial and non-commercial purposes.
The openssl_cipher_iv_length() function is new in PHP 8.2 and uses the underlying OpenSSL library to fetch key length information. It follows the same semantics as the existing openssl_cipher_key_length() function, and emits an E_WARNING level error when it encounters an unknown cipher algorithm name. The function returns the cipher initialization vector (iv) length required by a given cipher method, if known, or the default value of 128, for all other methods. It takes a single parameter, $method, which holds the cipher method name. This function also has an overload that accepts an ASN1 Object Identifier instead of a string. See PHP manual for details.