sha256 php example
Example 1: php sha256
echo hash('sha256', $_POST['ppasscode']);
Example 2: sha256 in php
$hash = hash('sha256', 'hello, world!');
var_dump($hash);
Example 3: php hash
$password = 'test123';
/*
Always use salt for security reasons.
I'm using the BCRYPT algorithm use any valid one you like.
*/
$options['salt'] = 'usesomesillystringforsalt';
$options['cost'] = 3;
echo password_hash($password, PASSWORD_BCRYPT, $options)