1$password = 'test123';
2
3/*
4 Always use salt for security reasons.
5 I'm using the BCRYPT algorithm use any valid one you like.
6*/
7$options['salt'] = 'usesomesillystringforsalt';
8$options['cost'] = 3;
9echo password_hash($password, PASSWORD_BCRYPT, $options)
1
2<?php
3echo hash('ripemd160', 'The quick brown fox jumped over the lazy dog.');
4?>
5
6
1Could this be a typo? (two Ps in ppasscode, intended?)
2
3$_POST['ppasscode'];
4I would make sure and do:
5
6print_r($_POST);
7and make sure the data is accurate there, and then echo out what it should look like:
8
9echo hash('sha256', $_POST['ppasscode']);
10Compare this output to what you have in the database (manually). By doing this you're exploring your possible points of failure:
11
12Getting password from form
13hashing the password
14stored password
15comparison of the two.