/ Published in: PHP

Hashing class for user login and registration
Expand |
Embed | Plain Text
class PassHash { // blowfish /* The Blowfish algorithm may not be implemented in all systems, even though it is quite popular by now. You may check your system with this code: if (CRYPT_BLOWFISH == 1) { echo "Yes"; } else { echo "No"; } */ // cost parameter // mainly for internal use } // this will be used to generate a hash self::$algo . self::$cost . '$' . self::unique_salt()); } // this will be used to compare a password against a hash return ($hash == $new_hash); } }
You need to login to post a comment.