mcrypt_module_self_test
(PHP 4 >= 4.0.2, PHP 5)
mcrypt_module_self_test — Teste un mode
Description
bool mcrypt_module_self_test
( string $algorithm
[, string $lib_dir
] )
mcrypt_module_self_test() effectue un test sur l'algorithme spécifié. Le paramètre optionnel lib_dir contient le chemin jusqu'au module de l'algorithme sur le système.
mcrypt_module_self_test() retourne TRUE si le test fonctionne, et FALSE sinon.
Example#1 Exemple avec mcrypt_module_self_test()
<?php
var_dump(mcrypt_module_self_test(MCRYPT_RIJNDAEL_128));
var_dump(mcrypt_module_self_test(MCRYPT_BOGUS_CYPHER));
?>
L'exemple ci-dessus va afficher :
bool(true) bool(false)