Names to ids

Hakim Cassimally hakim.cassimally at gmail.com
Wed Jan 25 14:38:01 GMT 2006


Can you keep a filename -> numeric id mapping somewhere else (sqlite,
bdb etc.) and just use an incrementing ID ?

osfa

On 25/01/06, Andy Armstrong <andy at hexten.net> wrote:
> 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