mcrypt_list_algorithms
(PHP 4 >= 4.0.2, PHP 5, PHP 7 < 7.2.0, PECL mcrypt >= 1.0.0)
mcrypt_list_algorithms — 獲取支援的加密演算法
警告
 本函式已自 PHP 7.1.0 起廢棄。強烈建議不要使用本函式。
說明
   mcrypt_list_algorithms(string 
  $lib_dir = ini_get("mcrypt.algorithms_dir")): array
   獲取 lib_dir 中
   包含的受支援的演算法。
  
參數
- 
lib_dir
- 
      指定演算法所在的位置。 如果未指定,將使用 php.ini 中的 mcrypt.algorithms_dir指示所指定的位置。
返回值
以陣列方式返回所有受支援的演算法。
範例
示例 #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
)