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

説明

mcrypt_list_algorithms(string $lib_dir = ini_get("mcrypt.algorithms_dir")): array

lib_dir パラメータにあるサポートするすべてのアルゴリズムの一覧を取得します。

パラメータ

lib_dir

すべてのアルゴリズムが存在するディレクトリを指定します。 指定しない場合は、php.inimcrypt.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
)

関連キーワード:  サポート, mcrypt, 配列, 取得, 暗号, algorithms, list, rijndael, アルゴリズム, 関数