mcrypt_module_is_block_mode()
(PHP 4 >= 4.0.2, PHP 5, PHP 7 < 7.2.0, PECL mcrypt >= 1.0.0)
检测指定模式是否以分组方式输出
WarningThis function has beenDEPRECATEDas of PHP 7.1.0. Relying on this functionis highly discouraged.
说明
mcrypt_module_is_block_mode(string $mode[,string $lib_dir]): bool
如果模式是以字节块(分组)方式输出,则返回TRUE
,如果只是以字节方式输出,则返回FALSE
。(例如,对于 cbc 和 ecb 模式,返回TRUE
,对于 cfb 和 stream 模式,返回FALSE
)
参数
- $mode
MCRYPT_MODE_modename
常量中的一个,或以下字符串中的一个:"ecb","cbc","cfb","ofb","nofb"和"stream"。- $lib_dir
可选参数$lib_dir,表示在操作系统上包含模式模块的路径。
返回值
如果模式是以字节块(分组)方式输出,则返回TRUE
,如果只是以字节方式输出,则返回FALSE
。(例如,对于 cbc 和 ecb 模式,返回TRUE
,对于 cfb 和 stream 模式,返回FALSE
)