pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: alvaro@audifarma.com.co
Cc: pgsql-sql@postgresql.org
Subject: Re: MD5 encrypt
Date: Fri, 26 Dec 2003 20:53:37 -0700
Message-ID: <20031226205337.A8572@quality.qadas.com> (raw)
In-Reply-To: <58478.200.31.204.249.1072284473.squirrel@audifarm.audifarma.com.co>
References: <58478.200.31.204.249.1072284473.squirrel@audifarm.audifarma.com.co>

On Wed, Dec 24, 2003 at 11:47:53AM -0500, alvaro@audifarma.com.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/



view thread (2+ messages)

Message-ID: <20031226205337.A8572@quality.qadas.com>
Permalink:  ../20031226205337.A8572@quality.qadas.com/
Also on:    postgresql.org/message-id/20031226205337.A8572@quality.qadas.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mike@fuhr.org, alvaro@audifarma.com.co
  Subject: Re: MD5 encrypt
  In-Reply-To: <20031226205337.A8572@quality.qadas.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox