Are there any other good/reliable hashs which are smaller than MD5 and faster? (for purposes of checking for file corruption - not for security purposes) (preferably 16bit?)
Are there any other good/reliable hashs which are smaller than MD5 and faster? (for purposes of checking for file corruption - not for security purposes) (preferably 16bit?)
Last edited by Tom50; 03-29-2013 at 10:51 PM.
Why do you need a hash function? Without knowing that, any advice given to you could well be wrong. Furthermore, it could even be the case that "smaller than MD5 and faster" are wrong criteria to begin with.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
It's just to quickly check for file corruption.
Oh, then maybe one of those in the CRC family will suffice.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
"Secure" hashes such as MD5, SHA etc are intentionally large and intentionally slow because that makes it harder to brute-force them.
What you are after is not one of the "secure" hash family of algorithms, and instead just need something for error detection.
You simply need a decent CRC method. A 16-bit CRC, perhaps CCITT, should be fine for this.
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"