Modules/hashing/md5

From Multi Theft Auto: Wiki
Revision as of 05:00, 19 September 2008 by 50p (talk | contribs) (New page: {{ModuleFunction|hashing}} Calculate the '''MD5''' hash of a string ==Syntax== <syntaxhighlight lang="lua"> string md5( string str ) </syntaxhighlight> ===Required arguments=== * '''str:''' string of which you wa...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Package-x-generic.png This function is provided by the external module hashing. You must install this module to use this function.

Calculate the MD5 hash of a string

Syntax

string md5( string str )

Required arguments

  • str: string of which you want to calculate the hash

Returns

String containing calculated MD5 hash of str or nil if str wasn't string

Example

Example: This calculates the hash of "hello world" and prints it in debug window

hash = md5( "hello world" ) -- calculate MD5 hash of "hello world"
outputDebugString( hash )


See also