md5 | Multi Theft Auto: Wiki Skip to content

md5

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 MD5 hash of the specified string and returns its hexadecimal representation.

Caution

It is strongly recommended to use passwordHash to hash passwords, md5 is easily decodeable.

Note

It returns an uppercase string, so make sure you string.upper() anything else you are checking against that has been MD5'd elsewhere.

Note

This function, along with other hashing algorithms, can be used for a plausible script self protection strategy. If done right this strategy does present the fact that the script wants to express ownership to a legal entity. This can be used as argument in a court of law or for DRM purposes. You can find the general idea here .

Syntax

md5 ( )

Code Examples

server
function md5it (player,command, theString) -- open function
if theString then -- check if the string is exist
md5string = md5(theString) -- get the md5 string
outputChatBox(theString.. " -> " .. md5string , player, 255, 0, 0, false) -- output it
end
end
addCommandHandler ("md5it", md5it) -- create command