How to correctly implement PHPass password hasher using codeigniter?

I am trying to correctly execute a password hash in codeigniter using phpass. I added the hash of the phpass password file to the library folder in codeigniter, and now I don’t know how to write the instruction correctly $t_hasher = new PasswordHash(8, FALSE);? Can you guys help with the correct syntax? Here is what I still have:

function passwordTry() 
{
    $this->load->library('PasswordHash', 'null', 'passHash');
    $hasher = new $this->passHash->PasswordHash(8, FALSE);
    $hash = $hasher->HashPassword('abcd');
    echo ($hash);
    }
+4
source share
1 answer
 $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;
+3
source

All Articles