[Koha] Password, hash, bcrypt

Bernardo Gonzalez Kriegel bgkriegel at gmail.com
Fri Feb 21 05:02:06 NZDT 2020


Hi Robm

I am getting envolved with Koha since last november. I am contributing in
> translation too, and digging BD, and scripts... Right now I have a new
> challenge: I need to know which method the system apply to encrypt
> borrowers' passwords. I know that uses Bcrypt 8, but the stored encrypted
> string does not match with typed string. Some clue???
>

What kind of match do you expect?

Try the following (using a Koha user shell) to see what an encrypted
password will look like

perl -e 'use Koha::AuthUtils qw ( hash_password ); $text = "clearpass";
$pass = hash_password( $text ); print "$text -> $pass\n";'

you will get something like

clearpass -> $2a$08$osRn3haIkwt2Lf3dAWAPt.aIpl/qRF7bNo1w4kVOmXZ09VzSwHmkC

Regards
Bernardo


More information about the Koha mailing list