I'm having trouble figuring out how to do this.
Laravel uses the PHP crypt
function. I'm not sure what the equivalent is in Ruby.
My passwords are hashed with a $2a
hash as well, if that makes a difference.
This is Laravel's function
public static function check($value, $hash)
{
return crypt($value, $hash) === $hash;
}
I've tried Bcrypt::Password.new as well as String#crypt but I can't seem to get them to work.
Example password $2a$08$WJZWRyljoJGx.qunOGuGLeDaOn/Q3ShEvGxTkx3csWXqWUF21GhBe
from the database and the real was 123456