(PHP 4 >= 4.0.2, PHP 5, PHP 7 < 7.2.0, PECL mcrypt >= 1.0.0)
mcrypt_list_algorithms — 获取所有支持的密码算法数组
此函数自PHP 7.1.0起已弃用,自PHP 7.2.0起已移除。强烈建议不要依赖此函数。
获取lib_dir参数中所有支持的算法列表。
lib_dir指定所有算法所在的目录。如果未指定,则使用mcrypt.algorithms_dir php.ini指令的值。
返回包含所有支持算法的数组。
示例 #1 mcrypt_list_algorithms() 示例
<?php
$algorithms = mcrypt_list_algorithms();
print_r($algorithms);
?>以上示例将输出类似以下内容
Array
(
[0] => cast-128
[1] => gost
[2] => rijndael-128
[3] => twofish
[4] => arcfour
[5] => cast-256
[6] => loki97
[7] => rijndael-192
[8] => saferplus
[9] => wake
[10] => blowfish-compat
[11] => des
[12] => rijndael-256
[13] => serpent
[14] => xtea
[15] => blowfish
[16] => enigma
[17] => rc2
[18] => tripledes
)