SHA1
From Liberty Unleashed Wiki
Note: This function requires the external module lu_hashing.
This function returns an SHA-1 hash value of the given string. This is useful for example when storing account passwords.
Syntax
string SHA1( string text )
Arguments
- text - The string to be hashed
Example
function onPlayerCommand( pPlayer, szCommand, szText ) { if ( szCommand == "sha1" ) { if ( szText ) MessagePlayer( "The SHA1 of " + szText + " is " + SHA1( szText ), pPlayer ); } return 1; }
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.
- MD5
- SHA1