mcrypt_module_self_test
(PHP 4 >= 4.0.2, PHP 5, PHP 7 < 7.2.0, PECL mcrypt >= 1.0.0)
mcrypt_module_self_test — 在指定模块上执行自检
警告
本函数已自 PHP 7.1.0 起废弃。强烈建议不要使用本函数。
说明
mcrypt_module_self_test(string
$algorithm
, string $lib_dir
= ?): bool在指定模块上执行自检。
参数
-
algorithm
-
MCRYPT_ciphername
常量中的一个,或者是字符串值的算法名称。 -
lib_dir
-
可选参数
lib_dir
, 表示包含加密算法模块的路径。
返回值
自检成功返回 true
,
自检失败返回 false
。
范例
示例 #1 mcrypt_module_self_test() 例程
<?php
var_dump(mcrypt_module_self_test(MCRYPT_RIJNDAEL_128)) . "\n";
var_dump(mcrypt_module_self_test(MCRYPT_BOGUS_CYPHER));
?>
以上例程会输出:
bool(true) bool(false)

User Contributed Notes
There are no user contributed notes for this page.
备份地址:http://www.lvesu.com/blog/php/function.mcrypt-module-self-test.php