array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.mcrypt-list-modes.php', 1 => 'mcrypt_list_modes', ), 'up' => array ( 0 => 'ref.mcrypt.php', 1 => 'Mcrypt 関数', ), 'prev' => array ( 0 => 'function.mcrypt-list-algorithms.php', 1 => 'mcrypt_list_algorithms', ), 'next' => array ( 0 => 'function.mcrypt-module-close.php', 1 => 'mcrypt_module_close', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/mcrypt/functions/mcrypt-list-modes.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_modes — サポートされる全てのモードの配列を取得する
この関数は PHP 7.1.0 で 非推奨となり、PHP 7.2.0 で削除 されました。この関数に頼らないことを強く推奨します。
lib_dir
にあるすべてのサポートするモードの一覧を取得します。
lib_dir
すべてのモードが存在するディレクトリを指定します。
指定しない場合は、
php.ini ディレクティブ mcrypt.modes_dir
を使用します。
サポートするすべてのモードを配列で返します。
例1 mcrypt_list_modes() の例
<?php
$modes = mcrypt_list_modes();
foreach ($modes as $mode) {
echo "$mode <br />\n";
}
?>
上の例は、デフォルトのモードディレクトリにあるサポートされる
全てのアルゴリズムの一覧を出力します。php.ini ディレクティブの
mcrypt.modes_dir
でこれが設定されていない場合、mcrypt の
デフォルトディレクトリ(/usr/local/lib/libmcrypt)が使用されます。