math.sha512

Supported in:
math.sha512(string)

Description

Returns the SHA-512 hash of the provided string.

Param data types

STRING

Return type

STRING

Code samples

Here are some examples of how to use the function:

Example 1

This example returns the SHA-512 hash of an empty string.

math.sha512("") = "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e"
Example 2

This example returns the SHA-512 hash of a random string.

math.sha512("safsghadfghasd") = "8060da762183d083cabb52cb99ace1d6d66d803d2011a27cb6a659d28278f3c4ee91ef21e0e61fc9cdb10a1b94de03d6e69de968347ccd0f3c02cb396ae948bc"