Re: - Mailing list pgsql-sql

From Richard Huxton
Subject Re:
Date
Msg-id 41FA01D5.6050708@archonet.com
Whole thread Raw
In response to ...  (Deepthi Darshan <deepthi@granwill.com>)
List pgsql-sql
Deepthi Darshan wrote:
> Hi,
> 
> I have a database which has been set to encoding UTF-8.
> 
> I have a table in this database in which i store the details of all the
> registered users. I am using PL/PGSQL and using one function i am entering the
> values into the database. There is one column for entering the passwords of all
> registered users. I want to store these passwords in an encrypted manner in the
> table. Can i encrypt the password in the stored procedure and will i not loose
> any data by entering the passwords in an encrytped manner.

There are a range of encryption functions available in contrib/pgcrypto 
in the source distribution.

Some encryption is one-way (so you can't recover the original password, 
just confirm a provided password matches it). Other encryption is 
two-way, but you usually have a separate key to encrypt the passwords then.

--  Richard Huxton  Archonet Ltd


pgsql-sql by date:

Previous
From: Deepthi Darshan
Date:
Subject: ...
Next
From: "Swati Gadre"
Date:
Subject: calling JAVA UDF through trigger