I would like to store a hashed password in the database but by that time I haven’t load Yii yet (due to my custom application installer). I want to know the equivalent of
in PHP. SO far I have tried with the PHP
function like this:
password_hash(filter_input(INPUT_POST, 'portal_password', FILTER_SANITIZE_STRING), PASSWORD_BCRYPT, array("cost" => 13));
The result comes out like:
but when I tried to login with my original password, it failed. I notice that often the result of CPasswordHelper::hashPassword has
but mine has
prefix. Anyone could help? Thanks!