I am using bcrypt to hash my passwords and it seems that symfony2 authentication system is not production the same hash as php's native crypt function. Bellow is the salt that I am generating for my user password:
$salt = '$2y$13$' . substr(md5(uniqid(rand(), true)),0,21) . '$';
$this->setPassword('test',$salt);
In my security.yml file I am simply doing:
encoders:
Blogger\BlogBundle\Entity\User:
algorithm: bcrypt
iterations: 13
Is there any reason why the two encoding methods would generate different hashes? The library I am using is ircmaxell/password-compat.