Hash: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (Added transition to the Russian page)
mNo edit summary
Line 4: Line 4:
This function returns a hash of the specified string in the specified algorithm.
This function returns a hash of the specified string in the specified algorithm.
}}
}}
{{Needs_Example}}


==Syntax==
==Syntax==
Line 16: Line 17:
===Returns===
===Returns===
Returns the hash of the data, false if an invalid argument was used.
Returns the hash of the data, false if an invalid argument was used.
 
==Example==
--Explain what the code does
<syntaxhighlight lang="lua">
-- Add example
</syntaxhighlight>
==See Also==
==See Also==
{{Utility functions}}
{{Utility functions}}
[[ru:hash]]
[[ru:hash]]

Revision as of 14:10, 10 August 2014

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

Accessories-text-editor.png Script Example Missing Function Hash needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.


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.

Example

--Explain what the code does

-- Add example

See Also