Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works
Anything · Lazarus or Delphi
Random projectRandom project

murmur-delphi

Murmur hash for Delphi

View on GitHub

Member rating

No ratings yet.

Sign in to rate this project.

README

murmur-delphi

Murmur hash for Delphi

MurmurHash is a fast, non-cryptographic, hash, suitable for hash tables.

It comes in three variants:

  • hash result of 32 bits
  • hash result of 128 bits, optimized for x86 architecture
  • hash result of 128 bits, optimized for x64 architecture

Sample Usage

In its simplest form, it can be used to generate the hash for a string:

pascal
var 
  hash: Cardinal;
pascal
hash := TMurmur3.HashString32('Customer_12793', $5caff01d);

But it can also support any other kind of data:

pascal
var 
  hash: Cardinal
  find: WIN32_FIND_DATA;
pascal
hash := TMurmur3.HashData32(find, SizeOf(WIN32_FIND_DATA), $ba5eba11);