Find conjugation invariant functions without using eigenvalues?

Let $K$ be an infinite field and $f:M_n(K)\to K$ a polynomial map which is constant on the conjugacy classes.

Claim. $f$ is a polynomial in the coefficients of the characteristic polynomial.

We can (and will) assume that $K$ is algebraically closed.

Observation. If a polynomial map $g:M_n(K)\to K$ vanishes on the diagonalizable matrices, then $g=0$.

Proof of the observation. We have $dg=0$, where $d$ is the discriminant of the characteristic polynomial. As $K$ is infinite, this implies $g=0$. QED

Proof of the claim.

By the observation, $f$ is determined by its restriction to the diagonal matrices.

This restriction is invariant by permutation of the diagonal entries.

Thus, this restriction is a polynomial in the elementary symmetric polynomials in the diagonal entries.

But these elementary symmetric polynomials are the coefficients of the characteristic polynomial.

Using again the observation, we see that $f$ itself is a polynomial in the coefficients of the characteristic polynomial. QED