Re: function for creating random id - Mailing list pgsql-general

From Neil Conway
Subject Re: function for creating random id
Date
Msg-id 20020416120801.5288958e.nconway@klamath.dyndns.org
Whole thread Raw
In response to Re: function for creating random id  (Moritz Sinn <moritz@freesources.org>)
List pgsql-general
On 16 Apr 2002 15:14:09 +0200
"Moritz Sinn" <moritz@freesources.org> wrote:
> Michael Loftis <mloftis@wgops.com> writes:
>
> > I've gotten intot he habit of using a sequence identifier, and couple
> > that with the current time then md5 sum that to create unique
> > uids. Works our fairly well, and is atleast marginally difficult to
> > guess.
>
> that sounds good. could you send me your function definition? because i
> don't now how to md5 sum in postgresql.

An implementation of MD5 is part of contrib/pgcrypto.

Cheers,

Neil

P.S. I remember hearing that MD4 has been found to be vulnerable
already, and that there are some theoretical weaknesses in
MD5. Does anyone have more info on this? I personally use
SHA1 anyway...

--
Neil Conway <neilconway@rogers.com>
PGP Key ID: DB3C29FC

pgsql-general by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Triggers and System Tables
Next
From: "Tarabas"
Date:
Subject: Wrong sort-order