echo crypt('test', "$2a$07$");
produces a long hash in PHP version 5.4.16, but it produces the "failure string" *0
in 5.6.4.
Reading the PHP docs on crypt(), I'm still not quite clear why, though the Changelog mentions the *1
being returned instead of *0
depending on the circumstance. (http://php.net/manual/en/function.crypt.php)
What is the reasoning for *0
being returned in this case? Did PHP past 5.4 stop tolerating the bad salt of the form $2a$07$
?
/
and+
. So this crypt function is netiher binary nor base64 compatible. – Vries