Skip to main content

Use a CRC32. The theoretical collision rate is one collision every half-million (or so) message IDs. If you can steal 4 more bytes, a CRC64 has a collision rate of one in two trillion (or so).

Surprisingly, Visual Studio 2005 doesn't have a CRC32() function in the System.Security.Cryptography namespace, but java.util.zip implements a CRC32 class. Plenty of source code examples on the web, in any language.

Add Reply

Post
×
×
×
×
Link copied to your clipboard.
×