I am trying to convert this C# code:
SHA512CryptoServiceProvider sha = new SHA512CryptoServiceProvider(); byte[] keybyte = sha.ComputeHash(Encoding.UTF