Using bcrypt-ruby to validate hashed passwords using version $2y
问题 We're in a bit of a bind where we need to use Ruby to auth users against an existing db of users. The user's passwords were all generated using password_compat PHP library. All the hashed passwords start with $2y. I've been using bcrypt-ruby to try and authenticate the users and I haven't found any success. #This user's password is "password" irb(main):041:0> g = BCrypt::Password.new("$2y$10$jD.PlMQwFSYSdu4imy8oCOdqKFq/FDlW./x9cMxoUmcLgdvKCDNd6") => "$2y$10$jD.PlMQwFSYSdu4imy8oCOdqKFq/FDlW.