Squirrel/Server/Functions/Hashing2/RIPEMD128

From Liberty Unleashed Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{Squirrel/Title|RIPEMD128}} {{RequiresModule|lu_hashing2|Modules/Squirrel/lu_hashing2}} This function returns an RIPEMD128 hash value of the given string. This is useful for ...")
 
(Example)
 
Line 16: Line 16:
 
function onPlayerCommand( pPlayer, szCommand, szText )
 
function onPlayerCommand( pPlayer, szCommand, szText )
 
{
 
{
if ( szCommand == "hash" )
+
if ( szCommand == "ripemd128" )
 
{
 
{
 
if ( szText ) MessagePlayer( "The RIPEMD128 of " + szText + " is " + RIPEMD128( szText ), pPlayer );
 
if ( szText ) MessagePlayer( "The RIPEMD128 of " + szText + " is " + RIPEMD128( szText ), pPlayer );

Latest revision as of 19:34, 3 March 2015

Home   |   Squirrel Scripting   |   Server Functions   |   Server Events   |   Client Functions   |   Client Events
Note: This function requires the external module lu_hashing2.

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

[edit] Syntax

  1. string RIPEMD128( string text )

[edit] Arguments

  • text - The string to be hashed

[edit] Example

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

[edit] Notes

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

[edit] Related Functions

Hashing2 adds the following hashing functions, while also offering the functions available in the regular hashing module. lu_hashing2.

Personal tools
Namespaces

Variants
Actions
Navigation
scripting
Toolbox