On Mon, Nov 19, 2001 at 04:06:06PM +1100, Brett Handley wrote:
> I hope this isn't a silly question.
> 
> Can the result of checksum/secure be used like a GUID, is it guaranteed to
> be unique?

No, hashing is a many-to-one operation, mapping from an infinite space
(arbitrarily long string series) to a finite space (string series of
length 20), so there always has to be the chance of collisions.

The chance of a collision is very small though, especially if you
deal with a small number of values, say, less than a billion billion
billion :-). For any two arbitrary strings to have the same checksum
the chance is 1/(2^160). For at least one collision among n strings
the chance is n/(2^160) (for n <= 2^160, obviously).

-- 
Holger Kruse
[EMAIL PROTECTED]

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to