$algorithms = mcrypt_list_algorithms();
var_dump($algorithms);
// sample output from PHP 5.3.3 on Mac OS X (Snow Leopard)
array(19) {
[0]=>
string(8) "cast-128"
[1]=>
string(4) "gost"
[2]=>
string(12) "rijndael-128"
[3]=>
string(7) "twofish"
[4]=>
string(7) "arcfour"
[5]=>
string(8) "cast-256"
[6]=>
string(6) "loki97"
[7]=>
string(12) "rijndael-192"
[8]=>
string(9) "saferplus"
[9]=>
string(4) "wake"
[10]=>
string(15) "blowfish-compat"
[11]=>
string(3) "des"
[12]=>
string(12) "rijndael-256"
[13]=>
string(7) "serpent"
[14]=>
string(4) "xtea"
[15]=>
string(8) "blowfish"
[16]=>
string(6) "enigma"
[17]=>
string(3) "rc2"
[18]=>
string(9) "tripledes"
}
mcrypt_list_algorithms
(PHP 4 >= 4.0.2, PHP 5)
mcrypt_list_algorithms — Gets an array of all supported ciphers
Descrição
array mcrypt_list_algorithms
([ string $lib_dir = ini_get("mcrypt.algorithms_dir")
] )
Gets the list of all supported algorithms in the lib_dir parameter.
Parâmetros
- lib_dir
-
Specifies the directory where all algorithms are located. If not specified, the value of the mcrypt.algorithms_dir php.ini directive is used.
Valor Retornado
Returns an array with all the supported algorithms.
Exemplos
Exemplo #1 mcrypt_list_algorithms() Example
<?php
$algorithms = mcrypt_list_algorithms("/usr/local/lib/libmcrypt");
foreach ($algorithms as $cipher) {
echo "$cipher<br />\n";
}
?>
The example above will produce a list with all supported algorithms in the "/usr/local/lib/libmcrypt" directory.
User Contributed Notes
mcrypt_list_algorithms
mcrypt_list_algorithms
ghoffman at salientdigital dot com
23-Nov-2010 06:17
23-Nov-2010 06:17

mcrypt_get_key_size