davidwood / node-password-hash

Password hashing and verification for node.js
MIT License
153 stars 30 forks source link

generate() generates different values for same input #17

Closed khuongdv closed 7 years ago

khuongdv commented 7 years ago

Few days ago I insert to DB the hash value of '123456' using passwordHash.generate('123456'). It outputted: sha1$b253daf8$1$21adfac34dd068d24f9174592680c43a333b985d

But today I get different values, more weird is the two new generated values are different too. View the log:

` current hash, 123456, sha1$3e0d4a44$1$6b277bc62d8dd425a8356bcfba4d377057dfac4e

db hash, 123456, sha1$b253daf8$1$21adfac34dd068d24f9174592680c43a333b985d

in config file, 123456, sha1$64501b0a$1$8867f8c517eac19122100a3ce5b7435d18c1da17
`

Did I use the generate() method wrong? :|