HMAC

If H(M)=H(N) then H(M, K)=H(N, K). So if the hash is weak, the attacker can search for collisions (and, if successful, break the security) without knowing the key K.