Core Function BinaryHash
From Sputnik Wiki
BinaryHash( <binary-array> )
Contents |
Description
Gain a unique Hash of the bytes in this binary variable.
Parameters
binary-array
The binary variable to generate the hash for.
Return Value
Success: Returns the hash.
Failure: Returns 0.
Remarks
The hash is unique and can be used to compare against another hash to see if both variables have the exact same data.
The hash is a 64Bit hash.
Example
my $bin = Pack("A*", "Hello world!"); my $hash = BinaryHash($bin); say $hash; // Prints: 55230833