title: How to create and store a SHA2-512 hash with PHP
body: <p>I tried to look for a SHA2-512 hashing function in PHP, but did not see one. For a project I am currently working on, I need to allow a user to reset their password. When they do so, I would like to hash the password using SHA2-512 in the PHP script, and then store it in the database with their associated username. I am already getting the username and password from the HTML form, so that is not an issue. I just can't seem to figure out how to use <code>hash()</code> or <code>openssl_digest()</code> to hash the password using SHA2-512 (I am using PHP 5). Also, would I just store the hexadecimal hash in my database as a <code>VARCHAR</code>? </p>