下列常量由此扩展定义,且仅在此扩展编译入 PHP 或在运行时动态载入时可用。
Xpass extension provides various set of constants. Hash methods (CRYPT_PREFIX_) for crypt_gensalt() prefix parameter. Error codes (CRYPT_SALT_) returned by crypt_checksalt(). Password algorithms (PASSWORD_) for password_hash() algo parameter.
CRYPT_PREFIX_STD_DES
(string)
4096
possible salts and 2**56 distinct passphrases,
which it truncates to 8 characters,
it is feasible to discover any passphrase hashed with this method.
It should only be used when supporting old operating systems that support
no other hash generation algorithm, due to how weak DES hashes are.
CRYPT_PREFIX_EXT_DES
(string)
CRYPT_PREFIX_MD5
(string)
CRYPT_PREFIX_BLOWFISH
(string)
CRYPT_PREFIX_SHA256
(string)
5000
,
which is too low for modern hardware.
CRYPT_PREFIX_SHA512
(string)
5000
,
which is too low for modern hardware.
CRYPT_PREFIX_SCRYPT
(string)
CRYPT_PREFIX_GOST_YESCRYPT
(string)
CRYPT_PREFIX_YESCRYPT
(string)
CRYPT_SALT_OK
(int)
CRYPT_SALT_INVALID
(int)
CRYPT_SALT_METHOD_DISABLED
(int)
CRYPT_SALT_METHOD_LEGACY
(int)
CRYPT_SALT_TOO_CHEAP
(int)
PASSWORD_SHA512
(string)
PASSWORD_SHA512
is used to create new password
hashes using the CRYPT_SHA512
algorithm.
PASSWORD_YESCRYPT
(string)
PASSWORD_YESCRYPT
is used to create new password
hashes using the CRYPT_YESCRYPT
algorithm.