openssl_cipher_iv_length
(PHP 5 >= 5.3.3, PHP 7, PHP 8)
openssl_cipher_iv_length — 암호 iv 길이를 가져옵니다.
설명
openssl_cipher_iv_length(string $cipher_algo
): int | false
암호 초기화 벡터(iv) 길이를 가져옵니다.
매개변수
cipher_algo
- 암호 메서드, 잠재적 값 목록은 openssl_get_cipher_methods()를 참조하십시오.
반환 값
성공하면 암호 길이를 반환하고 실패하면 false
를 반환합니다.
오류/예외
암호 알고리즘을 알 수 없는 경우 E_WARNING
수준 오류를 내보냅니다.
Examples
예제 #1 openssl_cipher_iv_length() 예제
<?php
$method = 'AES-128-CBC';
$ivlen = openssl_cipher_iv_length($method);
echo $ivlen;
?>
위의 예는 다음과 유사한 결과를 출력합니다.
16