Core Function Hash

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
UberFoX (Talk | contribs)
(Created page with "<pre> Hash( <expression> ) </pre> === Description === Generate a unique hash code for a string value === Parameters === ==== expression ==== The expression to compute the ha...")
Newer edit →

Revision as of 15:06, 13 December 2011

Hash( <expression> )

Contents

Description

Generate a unique hash code for a string value

Parameters

expression

The expression to compute the hash of (this will use the string value of a given variable).

Return Value

Success: Returns a number above or below zero.

Failure: Returns 0.

Remarks

This function computes a Int64 hash to provide a bit more uniqueness than a regular Int32 hash.

Example

As you see here both strings produce the same hash yet they were constructed differently.

println("Hash A: " . Hash("Hello") );
 
$lol = "o";
println("Hash B: " . Hash("He" . "ll" . $lol) );
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox