pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Shane Ambler <pgsql@Sheeky.Biz>
To: Andrej Ricnik-Bay <andrej.groups@gmail.com>
Cc: Eugenio Flores <eflores767003@yahoo.com.mx>
Cc: PostgreSQL <pgsql-sql@postgresql.org>
Subject: Re: How to store a password encripted in a user defined table
Date: Thu, 01 Mar 2007 22:09:43 +1030
Message-ID: <45E6BB7F.2070509@Sheeky.Biz> (raw)
In-Reply-To: <b35603930703010021y19b9807awbd2499bce9df952e@mail.gmail.com>
References: <629179.74925.qm@web55615.mail.re4.yahoo.com>
	<b35603930703010021y19b9807awbd2499bce9df952e@mail.gmail.com>

Andrej Ricnik-Bay wrote:
> On 3/1/07, Eugenio Flores <eflores767003@yahoo.com.mx> wrote:
>> Hello, I wonder if somebody knows how to store passwords in a
>> column that is part of a user defined table.
> Assuming that your passwords are application specific use
> a sha1 or md5 algorithm (depending on how sensitive your data is)
> and store that in a varchar or char field.  When the user authenticates
> the password gets hashed in the app and compared against the
> stored hash.
> 

If you want the server to take care of it look at pgcrypto - you will 
find it in the contrib folder of the source distro.

This doesn't give you an encrypted data type (but you could set that up 
if you wish) it will give you functions that you can use. Of course that 
would mean they get sent through the client connection as clear text 
unless you are using an SSL client connection.



-- 

Shane Ambler
pgSQL@Sheeky.Biz

Get Sheeky @ http://Sheeky.Biz



view thread (16+ messages)  latest in thread

Message-ID: <45E6BB7F.2070509@Sheeky.Biz>
Permalink:  ../45E6BB7F.2070509@Sheeky.Biz/
Also on:    postgresql.org/message-id/45E6BB7F.2070509@Sheeky.Biz

 · 

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: pgsql@Sheeky.Biz, andrej.groups@gmail.com, eflores767003@yahoo.com.mx
  Subject: Re: How to store a password encripted in a user defined table
  In-Reply-To: <45E6BB7F.2070509@Sheeky.Biz>

* 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