Re: How to store a password encripted in a user defined table

From: Shane Ambler <pgsql(at)Sheeky(dot)Biz>
To: Andrej Ricnik-Bay <andrej(dot)groups(at)gmail(dot)com>
Cc: Eugenio Flores <eflores767003(at)yahoo(dot)com(dot)mx>, PostgreSQL <pgsql-sql(at)postgresql(dot)org>
Subject: Re: How to store a password encripted in a user defined table
Date: 2007-03-01 11:39:43
Message-ID: 45E6BB7F.2070509@Sheeky.Biz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Andrej Ricnik-Bay wrote:
> On 3/1/07, Eugenio Flores <eflores767003(at)yahoo(dot)com(dot)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(at)Sheeky(dot)Biz

Get Sheeky @ http://Sheeky.Biz

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message John DeSoi 2007-03-01 13:25:28 Re: How to store a password encripted in a user defined table
Previous Message Shane Ambler 2007-03-01 11:38:42 Re: How to union table without union statement?