Optimizing Java SHA-512 String-to-Hash Generator
You should extract the hex encoding into its own method.

See How to convert a byte array to a hex string in Java? for various implementations.
input.getBytes() uses the locale dependent legacy encoding. So you won't get reproducible results on different systems. Specify an encoding explicitly, I recommend utf-8.