CakeFest 2024: The Official CakePHP Conference

mcrypt_list_modes

(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 で削除 されました。この関数に頼らないことを強く推奨します。

説明

mcrypt_list_modes(string $lib_dir = ini_get("mcrypt.modes_dir")): array

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)が使用されます。

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top