DomBlack/php-scrypt — pull request #21 by moderndeveloperllc (2013-11-27 20:10:50+00:00)
Title: Use @ircmaxwell password_compat logic to generate salts; PSR-2 formatting; hash parameter sanity checks

Congruent with issue #20, the generateSalt() function now uses better salt generation copied, with small changes, from @ircmaxell's [password_compat](https://github.com/ircmaxell/password_compat ) bcrypt class. Made code a bit more PSR-2 compliant with the removal of the _ from the private var, spacing cleanup, etc. Added sanity checking for the hash() function with @ezimuel checks he created in [ZF2's scrypt module](https://github.com/zendframework/zf2/blob/master/library/Zend/Crypt/Key/Derivation/Scrypt.php#L35). Made class abstract as all methods are static and class should never be instantiated.

If these changes are acceptable, I will go in and clean up things like the explode() that is keeping the function from using $ characters in the salt, and adding optional compatibility to the [wg/scrypt](https://github.com/wg/scrypt) Java scrypt class.