Sha384 Shared function

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

This function was added in version: 0.0.0

Calculates the Sha384 hash of the specified text. Hash lenght is 96 hex chars.

NOTE! Returned hash is lowercase.

Syntax

string sha384(string text)

Required Arguments

  • text: The text which will be hashed.

Returns

  • string: The function returns Sha384 text hash.

Example

Server

local function initHandler(pid)
{
	local message = "Jackdaws love my big sphinx of quartz";
	local hash = sha384(message);
	print(hash);
}

addEventHandler("onInit", initHandler);

Client

local function initHandler()
{
	local message = "Jackdaws love my big sphinx of quartz";
	local hash = sha384(message);
	print(hash);
}

addEventHandler("onInit", initHandler);

Related functions