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

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Reply via email to