src/Auth/Password.php
public static function comparePasswordToHash( $plainText, $hash ) {
		if ( self::isBlowfishHash( $hash ) ) {
			$check = crypt( $plainText, $hash );

		} else {
			// horrible unsalted md5 that legacy app used for passwords
			$check = md5( $plainText );
		}

		return self::hashEquals( $hash, $check );
	}
public static function comparePasswordToHash( $plainText, $hash ) {
		if ( self::isBlowfishHash( $hash ) ) {
			$check = crypt( $plainText, $hash );

		} else {
			// horrible unsalted md5 that legacy app used for passwords
			$check = md5( $plainText );
		}

		return self::hashEquals( $hash, $check );
	}
public static function comparePasswordToHash ( $ plainText , $ hash ) { if ( self :: isBlowfishHash ( $ hash ) ) { $ check = crypt ( $ plainText , $ hash ) ; } else { // horrible unsalted md5 that legacy app used for passwords $ check = md5 ( $ plainText ) ; } return self :: hashEquals ( $ hash , $ check ) ; }
Compare a plain text string to a stored password hash.

@param string $plainText Password to check
@param string $hash Stored hash to compare with
@return bool True if plain text matches hash, false otherwise
Compare a plain text string to a stored password hash .