ZF2-462: Throws exception when trying to generate bcrypt

Issue Type: Bug Created: 2012-08-11T13:55:15.000+0000 Last Updated: 2012-10-08T20:14:59.000+0000 Status: Closed Fix version(s): Reporter: Nicolas Eeckeloo (neeckeloo) Assignee: Enrico Zimuel (zimuel) Tags: - Zend\Crypt

Related issues: Attachments:


Zend\Crypt\Password\Bcrypt throws exception "Error during the bcrypt generation" when "create" method is called. I work with Zend Server that uses version "5.3.8-ZS5.5.0" of PHP. I think maybe the wrong salt prefix ($2y$) is selected because the exception is not thrown if I force the code to use "$2a$" as prefix.


Posted by Enrico Zimuel (zimuel) on 2012-08-12T11:12:45.000+0000

This is odd because the "$2y$" prefix should be used instead of "$2a$" starting from PHP 5.3.7+ (for more details: Can you show me the snippet code that you are trying to execute?

Posted by Nicolas Eeckeloo (neeckeloo) on 2012-08-12T15:58:30.000+0000

I use the ZfcUser module of Evan Coury that provide authentication feature. The "$hash" variable of \Zend\Crypt\Password\Bcrypt::create method has always a length of 13.

Posted by Ralph Schindler (ralph) on 2012-10-08T20:14:59.000+0000

This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit:

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.