Failed to load latest commit information.
This is Jody Bruchon's hashing function and a very simple command-line tool to produce hexadecimal hash strings (and also to show how to use jody_hash). It can be built to produce 64-bit, 32-bit, and 16-bit hash variants. When building, the default is 64-bit, but can be overridden like so: make CFLAGS_EXTRA=-DJODY_HASH_WIDTH=32 This will generate a 32-bit width version of the program. Obviously, the different widths are incompatible with each other. The program will tell you what bit width it was built for when invoked with the -v option. If you wish to plug jodyhash into any place where md5sum, sha1sum, and friends are already used, there is a basic compatibility option '-s' that will print hashes plus file names with a leading asterisk. Remember that jodyhash is not a "secure hash function" so don't use it as a signature mechanism for authenticating anything! If you'd like to prevent jody_hash.h from defining hash_t for compatibility, just "#define JODY_HASH_NOCOMPAT" before you #include and it'll only use jodyhash_t. Full disclosure: SMHasher's tests indicate this hash has undesirable properties and is slower than some other hashes. In practice I have only found a single collision out of a pile of millions of strings, but you may prefer the faster hashes t1ha or xxHash64 instead. xxHash64 has a lot of non-C implementations available. The SMHasher repo maintainer said that "it [jodyhash] isn't a great hash, but it's not a terrible one and there are several that are much worse." I'll take that as a compliment since this is the first hash I ever wrote :-) The home page for this program is: https://github.com/jbruchon/jodyhash If you find this useful, send me an email to firstname.lastname@example.org :-)