There's more than one way to do things | |
PerlMonks |
Re^5: MD5-based Unique Session ID Generatorby ctilmes (Vicar) |
on Aug 20, 2004 at 12:12 UTC ( [id://384582]=note: print w/replies, xml ) | Need Help?? |
I would even go as far as to say that double hashing can actually make more collisions. If you get a collision with the first hash, you absolutely will get a collision with the second hash, but if you don't get a collision with the first hash, you still have a chance of getting a collision with the second hash.
say you start with X and Y.
hash(X) = X'
hash(X') = X''
if X' = Y' (collision with first hash), then X'' = Y'' (collision with second hash)
In Section
Cool Uses for Perl
|
|