FarmHash checksums


The checksums.farmhash vocabulary implements portable, non-cryptographic FarmHash algorithms using the checksum protocol. Input is a sequence of bytes; encode text to bytes before hashing.

Unseeded hashes use Google's stable Fingerprint32, Fingerprint64, and Fingerprint128 algorithms. Seeded hashes use the fixed variants documented below. These choices give consistent results across architectures and build modes. Google's generic Hash32 and Hash64 APIs may select different algorithms depending on the CPU and build configuration.
farmhash-32

<farmhash-32> ( seed -- farmhash-32 )

farmhash-64

<farmhash-64> ( seed -- farmhash-64 )

farmhash-128

<farmhash-128> ( seed -- farmhash-128 )


Examples
USING: checksums checksums.farmhash prettyprint ; B{ } f <farmhash-64> checksum-bytes .
11160318154034397263

Reference implementation: https://github.com/google/farmhash.