MD5

From Liberty Unleashed Wiki
Jump to: navigation, search
Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events
Note: This function requires the external module lu_hashing.

This function returns an MD5 hash value of the given string. This is useful for example when storing account passwords.

Syntax

  1. string MD5( string text )

Arguments

  • text - The string to be hashed

Example

  1.  
  2. function onPlayerCommand( pPlayer, szCommand, szText )
  3. {
  4. if ( szCommand == "hash" )
  5. {
  6. if ( szText ) MessagePlayer( "The MD5 of " + szText + " is " + MD5( szText ), pPlayer );
  7. }
  8. return 1;
  9. }
  10.  

Notes

The function MessagePlayer and event onPlayerCommand were used in this example. More info about them in the corresponding pages.

Related Functions

These functions are provided by the official module lu_hashing.

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox