SHA512()

Converts a string to a 512-bit hexadecimal SHA-2 hash.

The SHA512() function has two parameters:

  • stringToConvert (string): Required. The string to encode.
  • charSet (string): The character set to use for the encoding. The default value is UTF-8, but you can also use UTF-16 encoding.

To use this function, pass it a string.

The function outputs a SHA-2 hash of the provided string: 495a8104eef74ae73518705a8227555b596958343b4506860f1925a9cd7056e25473306a9d5ab841147d41cb7476dd965ab37f21bd379d625d42b40f18ef3356

You can also generate the hash using UTF-16 encoding, as in this example.

The function outputs a SHA-2 hash that uses UTF-16 encoding: 82fdb746ae8cc9a50b4da8e92706e41ef9d242a66c3d40a2a698124583f81769f35226679edbd2fa05c900a6c9ab8337b31f8fcc6f9f9cdfa56001899f758d8a