Sha512 Shared function

From Gothic 2 Online: Wiki
Jump to navigation Jump to search

This function was added in version: 0.0.0

Calculates the Sha512 hash of the specified text. Hash lenght is 128 hex chars.

NOTE! Returned hash is lowercase.

Syntax

string sha512(string text)

Required Arguments

  • text: The text which will be hashed.

Returns

  • string: The function returns Sha512 text hash.

Example

Server

local function initHandler(pid)
{
	local message = "The five boxing wizards jump quickly";
	local hash = sha512(message);
	print(hash);
}

addEventHandler("onInit", initHandler);

Client

local function initHandler()
{
	local message = "The five boxing wizards jump quickly";
	local hash = sha512(message);
	print(hash);
}

addEventHandler("onInit", initHandler);

Related functions