MD5 encrypt

Lists: pgsql-sql
From: alvaro(at)audifarma(dot)com(dot)co
To: pgsql-sql(at)postgresql(dot)org
Subject: MD5 encrypt
Date: 2003-12-24 16:47:53
Message-ID: 58478.200.31.204.249.1072284473.squirrel@audifarm.audifarma.com.co
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

Hi,

Is there any function on postgresql that allows to encrypt data when
making an Insert statment?

Tks a lot,

Alvaro


From: Michael Fuhr <mike(at)fuhr(dot)org>
To: alvaro(at)audifarma(dot)com(dot)co
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: MD5 encrypt
Date: 2003-12-27 03:53:37
Message-ID: 20031226205337.A8572@quality.qadas.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-sql

On Wed, Dec 24, 2003 at 11:47:53AM -0500, alvaro(at)audifarma(dot)com(dot)co wrote:
>
> Is there any function on postgresql that allows to encrypt data when
> making an Insert statment?

What kind of encryption are you looking for? MD5 is a one-way hash:
you can't decrypt the hash to get back the original plaintext. If that's
what you need (e.g., for storing passwords), then you could use the md5()
function that's part of the the standard distribution since version 7.4.

http://www.postgresql.org/docs/current/static/functions-string.html

For older versions of PostgreSQL or for additional encryption functions,
see the code in contrib/pgcrypto.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/