"Sputnik" help  
Sputnik Help


Calculates the 64-bit xxHash hash value for the given binary string.


<binary> The binary string to calculate the hash value for.

Return Value

Success: Returns the hash value as an integer.
Failure: Returns 0.


The BinaryHash32Xx and BinaryHash64Xx functions provide an efficient way to calculate hash values for binary strings using the xxHash algorithm. xxHash is a non-cryptographic hash function known for its high speed and low memory footprint. It produces reliable hash values that are useful in various applications such as data integrity checks, hash tables, and checksum verification. The 32-bit xxHash algorithm is suitable for general hash calculations, while the 64-bit xxHash algorithm offers a larger hash space and can be beneficial in scenarios that require a higher degree of uniqueness in hash values.

The BinaryHash32Xx and BinaryHash64Xx functions utilize the xxHash algorithm for calculating hash values of binary strings. These hash functions provide a reliable and efficient way to generate hash codes. The resulting hash values are consistent and deterministic, meaning that the same binary input will always produce the same hash value. This property makes them useful for various purposes, such as data integrity checks, duplicate detection, or indexing. By comparing the hash values of different binary strings, you can quickly determine if they are identical or if any modifications have occurred. However, it's important to note that these hash functions do not provide cryptographic security and should not be used for cryptographic purposes.


BinaryHash32Xx, BinaryHash32, BinaryHash64


Example of usage:

my $a = Bin("Hello World!");
say BinaryHash32Xx($a);
say BinaryHash64Xx($a);

// 198612872
// 11901650877036842385


Cheryl (uberfox@hotmail.com)