Crack 函数
PHP Manual

crack_check

(PECL crack >= 0.1)

crack_checkPerforms an obscure check with the given password

说明

bool crack_check ( resource $dictionary , string $password )
bool crack_check ( string $password , string $username = "" , string $gecos = "" , resource $dictionary = NULL )

Performs an obscure check with the given password on the specified dictionary. The alternative signature also takes into account the username and the GECOS information.

Warning

此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担 。

参数

dictionary

The crack lib dictionary. If not specified, the last opened dictionary is used.

password

The password to be checked.

username

The username of the account with the password.

gecos

The GECOS information associated with the user account.

返回值

Returns TRUE if password is strong, or FALSE otherwise.

更新日志

版本 说明
0.3 The username, gecos and dictionary parameters were added to the alternative signature.


Crack 函数
PHP Manual