Replace which by hash.