Hash

From Multi Theft Auto: Wiki
Revision as of 10:06, 9 August 2014 by Arran Fortuna (talk | contribs) (Created page with "__NOTOC__ {{Server client function}} This function returns a hash of the specified string in the specified algorithm. ==Syntax== <syntaxhighlight lang="lua"> string hash ( string algorithm, s...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function returns a hash of the specified string in the specified algorithm.

Syntax

string hash ( string algorithm, string dataToHash )

Required Arguments

  • algorithm: A string which must be one of these: "md5", "sha1", "sha224", "sha256", "sha384", "sha512"
  • dataToHash: A string of the data to hash.

Returns

Returns the hash of the data, false if an invalid argument was used.

Minimum server version 1.4.0-6791
Minimum client version 1.4.0-6791

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.4.0-6791" client="1.4.0-6791" />

See Also