|
openssl_password_hashCreate a password hash using OpenSSL's Argon2 implementation Description
string openssl_password_hash(string
$algo, string $password, array $options = [])Creates a password hash using OpenSSL's Argon2 implementation. This is an alternative to password_hash that uses OpenSSL as the backend, which may offer hardware acceleration on some platforms.
This function is only available when PHP is compiled with OpenSSL
support that includes Argon2 ( Parameters
Return ValuesReturns the password hash as a string. Errors/Exceptions
Throws a ValueError if Throws an Error if the hashing operation fails for an unknown reason. Changelog
ExamplesExample #1 openssl_password_hash example The above example will output something similar to: $argon2id$v=19$m=65536,t=4,p=1$c29tZXNhbHR2YWx1ZQ$hashvalue... Example #2 openssl_password_hash with custom options See Also
|