Names to ids

Andy Armstrong andy at hexten.net
Wed Jan 25 14:25:04 GMT 2006


On 25 Jan 2006, at 14:11, David Landgren wrote:
> If you want all the bits to influence the outcome, then xor the 4  
> words of the MD5 checksum together. Something like
>
>     my $number = 0;
>     $number ^= $_ for unpack 'N4', md5($filename);
>
> should do the trick.

Unnecessary. If you think about it I'm sure you'll agree that any  
part of the MD5 hash has to be as good as any other part. If that  
wasn't the case MD5 would be a pretty poor hashing algorithm.

-- 
Andy Armstrong, hexten.net



More information about the london.pm mailing list