<?php
$ciphers = openssl_get_cipher_methods();
$ciphers = array_filter($ciphers, function ($n) {
return stripos($n, "ecb") === FALSE;
});
$ciphers = array_filter($ciphers, function ($c) {
return stripos($c, "des") === FALSE;
});
$ciphers = array_filter($ciphers, function ($c) {
return stripos($c, "rc2") === FALSE;
});
$ciphers = array_filter($ciphers, function ($c) {
return stripos($c, "rc4") === FALSE;
});
$ciphers = array_filter($ciphers, function ($c) {
return stripos($c, "md5") === FALSE;
});
if (is_array($ciphers)) {
foreach ($ciphers as $cipher) {
echo $cipher.': ';
echo openssl_cipher_iv_length($cipher);
echo "<br>\n";
}
}
?>
Will be...
AES-xxx-xxx is 16
BF-xxx is 8
CAMELLIA-xxx is 16
CAST5-xxx is 8
IDEA-xxx is 8
SEED-xxx is 16
lower case:
aes-xxx-xxx are mixed between 16 and 12.
id-aes-xxx are mixed between 12 and 8.
The values above are tested with PHP 5.5 - 5.6 on Windows. In PHP 7.x is different than this.