Sha256 Shared function
Jump to navigation
Jump to search
This function was added in version: 0.0.0 |
Calculates the Sha256 hash of the specified text. Hash lenght is 64 hex chars.
NOTE! Returned hash is lowercase. |
Syntax
string sha256(string text)
Required Arguments
- text: The text which will be hashed.
Returns
- string: The function returns Sha256 text hash.
Example
Server
local function initHandler(pid)
{
local message = "The quick brown fox jumps over the lazy dog";
local hash = sha256(message);
print(hash);
}
addEventHandler("onInit", initHandler);
Client
local function initHandler()
{
local message = "The quick brown fox jumps over the lazy dog";
local hash = sha256(message);
print(hash);
}
addEventHandler("onInit", initHandler);