array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.mcrypt-list-algorithms.php', 1 => 'mcrypt_list_algorithms', ), 'up' => array ( 0 => 'ref.mcrypt.php', 1 => 'Mcrypt 関数', ), 'prev' => array ( 0 => 'function.mcrypt-get-key-size.php', 1 => 'mcrypt_get_key_size', ), 'next' => array ( 0 => 'function.mcrypt-list-modes.php', 1 => 'mcrypt_list_modes', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/mcrypt/functions/mcrypt-list-algorithms.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(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
すべてのアルゴリズムが存在するディレクトリを指定します。
指定しない場合は、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 )