Re: MD5 - Mailing list pgsql-general

From Tino Wildenhain
Subject Re: MD5
Date
Msg-id 1103243943.5337.163.camel@Andrea.peacock.de
Whole thread Raw
In response to Re: MD5  (Jamie Deppeler <jamie@doitonce.net.au>)
List pgsql-general
Am Freitag, den 17.12.2004, 10:55 +1100 schrieb Jamie Deppeler:
> Tino Wildenhain wrote:
> > Hi,
> >
> > Am Freitag, den 17.12.2004, 09:41 +1100 schrieb Jamie Deppeler:
> >
> > > Hi,
> > >
> > > I was just wondering is it possible to encrypt a filed in the database
> > > with md5? i know it is possible to do it with DB users
> > >
> >
> > No. You cannot encrypt with md5 because you cant decrypt.
> > md5 is a hash function. But you can use it any time to
> > hash values you insert.
> >
> > Regards
> > Tino
> >
> >
> >
> >
> Well basically i want to store and hashed value that will never be
> changed just compaired too hashed values
>
> also when i try to encrpyt a field i get this error
> encypt(text,"unknown","unknown")

No, encrypt would not be md5. md5 hash is calculated
via md5() which is built in on and above 7.3 I believe.
If you need more/other functions, try contrib/pgcrypt
or so - this is a couple of functions to implement encryption.
(Depending on your installation, postgres-contrib might be
a seperate package)

Regards
Tino


pgsql-general by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: MD5
Next
From: Peter Eisentraut
Date:
Subject: Re: sorting problem