Re: Hash Function: MD5 or other?

From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Shelby Cain <alyandon(at)yahoo(dot)com>, Peter Fein <pfein(at)pobox(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Hash Function: MD5 or other?
Date: 2005-06-14 08:34:24
Message-ID: 1118738065.5605.43.camel@sabrina.peacock.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Am Dienstag, den 14.06.2005, 02:40 -0400 schrieb Greg Stark:
> Shelby Cain <alyandon(at)yahoo(dot)com> writes:
>
> > > My question is: is the builtin MD5 appropriate for this use or should I be
> > > using a function from pl/something? Figures on collision rates would be
> > > nice as well - the typical chunk of text is probably 1k-8k.
>
> Note that MD5 is slow and CPU-intensive. By design.
>
> If you want a quick way to find matching records then you might find something
> like CRC to be more useful. With MD5 it's supposed to be hard for someone to
> come up with inputs that hash to a target value, but if you're not too worried
> about people trying to do that then MD5 is probably overkill.
>
Sha1 is said to be faster.
(And less likely to collisions)
--
Tino Wildenhain <tino(at)wildenhain(dot)de>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Meder 2005-06-14 08:52:53 Re: duplicate key violates unique constraint
Previous Message Devrim GUNDUZ 2005-06-14 07:59:36 Re: postgresql rpms (7.4.2, 7.4.5, 7.4.8) for redhat 8.0