Re: Encoding passwords

From: Marko Kreen <marko(at)l-t(dot)ee>
To: Mike Arace <mikearace(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Encoding passwords
Date: 2001-09-25 17:44:58
Message-ID: 20010925194458.B986@l-t.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Sep 25, 2001 at 08:42:04AM -0400, Mike Arace wrote:
>
> Is there a function out there for pg which allows you to generate a random
> number given a seed value? I'm trying to create a users table which would
> require the storage of a password in a database field, and I'm hesitant to
> put it in there in plain text, despite the fact I plan to put very tight
> restrictions on that particular table. Ideally, I would encode each letter
> one by one, using the random number generator with the previous letter as a
> seed for the next. I was told that certain unixes use a similar way to
> store their passwords, and it seemed to make sense for this application. I
> noticed that there is a rand() function, but I'm a little slow today and
> couldn't think a way to use that in this scenario. Any suggestions would be
>
> greatly appreciated.

Look into contrib/pgcrypto in CVS, or

http://www.l-t.ee/marko/pgsql/pgcrypto-0.3.tar.gz

in meantime. Gives you crypt() function not unlike in UNIXes.
Also gen_salt() for generating salts for it.

--
marko

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2001-09-25 17:50:53 Re: upper case constraint?
Previous Message Doug McNaught 2001-09-25 17:19:40 Re: upper case constraint?