framework/utils/CPasswordHelper.php
public static function verifyPassword($password, $hash)
	{
		self::checkBlowfish();
		if(!is_string($password) || $password==='')
			return false;

		if (!$password || !preg_match('{^\$2[axy]\$(\d\d)\$[\./0-9A-Za-z]{22}}',$hash,$matches) ||
			$matches[1]<4 || $matches[1]>31)
			return false;

		$test=crypt($password,$hash);
		if(!is_string($test) || strlen($test)<32)
			return false;

		return self::same($test, $hash);
	}
public static function verifyPassword($password, $hash)
	{
		self::checkBlowfish();
		if(!is_string($password) || $password==='')
			return false;

		if (!$password || !preg_match('{^\$2[axy]\$(\d\d)\$[\./0-9A-Za-z]{22}}',$hash,$matches) ||
			$matches[1]<4 || $matches[1]>31)
			return false;

		$test=crypt($password,$hash);
		if(!is_string($test) || strlen($test)<32)
			return false;

		return self::same($test, $hash);
	}
public static function verifyPassword ( $ password , $ hash ) { self :: checkBlowfish ( ) ; if ( ! is_string ( $ password ) || $ password === '' ) return false ; if ( ! $ password || ! preg_match ( '{^\$2[axy]\$(\d\d)\$[\./0-9A-Za-z]{22}}' , $ hash , $ matches ) || $ matches [ 1 ] < 4 || $ matches [ 1 ] > 31 ) return false ; $ test = crypt ( $ password , $ hash ) ; if ( ! is_string ( $ test ) || strlen ( $ test ) < 32 ) return false ; return self :: same ( $ test , $ hash ) ; }
Verify a password against a hash.

@param string $password The password to verify. If password is empty or not a string, method will return false.
@param string $hash The hash to verify the password against.
@return bool True if the password matches the hash.
@throws CException on bad password or hash parameters or if crypt() with Blowfish hash is not available.
Verify a password against a hash .