[Asterisk-Dev] dev conf topic: better CDRs

Michael Giagnocavo mgg-digium at atrevido.net
Wed Feb 23 19:13:13 MST 2005


-----Original Message-----
bounces at lists.digium.com] On Behalf Of Tilghman Lesher
>That's lovely, but MD5 is not guaranteed to be unique (and it wasn't
>designed to be unique, only to be a cryptographic hash), given a set of
>inputs.  Over time, the probability of a collision increases.

That's right. MD5 should not be used where a unique key is needed.

>Currently, we have a 2 integer method, which is guaranteed to be
>machine-unique:  unixtime and instance increment, which, as long as
>the daemon isn't constantly restarting, is fine.  To add network
>uniqueness, the addition of a third integer should be sufficient:  the
>32-bit integer representation of the IP address.  Oddly, that's 96 bits,
>32 less than MD5, yet it's guaranteed to be unique for at least the next
>30 years.

What's wrong with using a GUID?

-Michael





More information about the asterisk-dev mailing list