php Function Sodium Crypto Pwhash Str
The php function sodium_crypto_pwhash_str generates a random password hash for use with salt. Depending on the chosen salt, this function can also be used to verify the hash. The salt should be randomly generated and stored in a secret location (preferably not on the web server). The result of the function is an ASCII-encoded string that can then be stored as part of a database or file for later verification.
Sodium is a high-level library of functions that perform cryptography operations such as encryption and verification. It's usually bundled with PHP as an extension and is a great choice for password hashing and authentication, because it uses a modern, secure, easy to configure algorithm called Argon2. As of PHP 7.2, the standard password_hash() function supports argon2 by default, which is a huge improvement over previous choices like MD5 or SHA-1.
The