I'm struggling to correctly execute a password hash in codeigniter using phpass. I have added the phpass password hash file to the libraries folder in codeigniter, and now I don't know how to correctly write the statement $t_hasher = new PasswordHash(8, FALSE);
? Can you guys help with the correct syntax? Here's what I have so far:
function passwordTry()
{
$this->load->library('PasswordHash', 'null', 'passHash');
$hasher = new $this->passHash->PasswordHash(8, FALSE);
$hash = $hasher->HashPassword('abcd');
echo ($hash);
}
$this->load->library('PasswordHash',array('iteration_count_log2' => 8, 'portable_hashes' => FALSE ), 'passHash');
$secure_password = $this->passHash->CheckPassword($this->input->post('password'),$pass['password']);
echo $secure_password;