Bycript/Blowfish and Salts with existing auth system
问题 I'm trying to transition to Blowfish for an authentication system. Bear with me, I'm not a cryptographer and my understanding of Blowfish is not quite there yet. The current setup uses sha1 and salts. The salts are generated for each user and stored in the database. It boils down to this: $salt = $this->getSalt($username); $hash = sha1($password . $salt); if ($hash == $hashInDB) { // user is authenticated, set session id etc ... } The getSalt() method gets the salt stored in the database for