sha256 | Multi Theft Auto: Wiki Skip to content

sha256

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


Calculates the sha256 hash of the specified string.

Tip

The sha module and this function may conflict with eachother, if you use this function uninstall the module! This function returns an uppercase string, so make sure you string.upper() anything else you are checking against that has been sha256'd elsewhere.

Syntax

sha256 ( )

Code Examples

server
addCommandHandler ( "sha", -- Create a command
function ( thePlayer, command, input )
if ( input ) then -- Check if the string exist
local sha256hash = sha256( input ) -- Generate the hash
outputChatBox( sha256hash ) -- Output the hash in the chat
end
end
)