MD5 encryption how to store in database - Mailing list pgsql-novice

From Sudheesh Krishnankutty
Subject MD5 encryption how to store in database
Date
Msg-id Pine.LNX.4.21.0305151703250.5891-100000@pc4.softjin.com
Whole thread Raw
In response to Re: MD5 encryption, Was: Multilingual database  (Dani Oderbolz <oderbolz@ecologic.de>)
List pgsql-novice
Hi,

  May some one help me in how to store encrypted password into
  postgres database.

  My problem is

  I want to store username, password into the postgres database

  I am using java functions to encrypt the password.

  My questions are.

  -- What should be the data type of encrypted password ( will varchar
  do?)
  -- I tried storing it as varchar but when i do a select, I could see
  some characters gets changed.
  -- What all characters needs to be escaped and how do i do it in an
  insert query.
    // insert into user_pass (username, do_escape(encrypted_pass));
  -- is there a do_escape kind of function?

  -- If I do_escape and store; while selecting from database do i need
  to do some conversion.

  I went thru the postgres manuals but i couldn't follow it.

  If any one can throw some lights on it, it will be of great help.

regards

sudheesh

> M. Bastin wrote:
>
> > Say Dani,
> >
> > Do you know where I can find the specs of MD5, like it is implemented
> > in pgsql?
> > I've been doing google searches on MD5 a week ago or so, but didn't
> > come up with any explanation on how to program MD5 encryption.  I
> > didn't even find *the* MD5, but all kinds of derivated encryption
> > techiques--without explanations.
> >
> > Thanks,
> >
> > Marc
>
> Well, I suggest you download the phplib
> (http://sourceforge.net/projects/phplib/, I does all that kind of stuff
> for you.
>
> Cheers, Dani
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

--
Sudheesh K
Software Engineer EDA
SoftJin Infotech Pvt. Ltd.
No 227/70/A Sigma Arcade 1
Marathahalli
Airport Road,
Bangalore - 560037
Phone: 91-080-5234641/2 ext 206
Fax: 91-080-5234643
--------------------------------------------------------------------------------
This e-mail message and any files transmitted with it are intended solely for
the use of the individual or entity to which they are addressed. It may contain
confidential, proprietary or legally privileged information. If you are not the
intended  recipient please be advised that  you have  received this message in
error and any use is strictly prohibited. Please immediately delete it and all
copies of it from your system, destroy any hard copies of it and notify the
sender by return mail. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the intended
recipient.
------------------------------------------------------------------------------


pgsql-novice by date:

Previous
From: Dani Oderbolz
Date:
Subject: Re: MD5 encryption, Was: Multilingual database
Next
From: "Fontenot, Paul"
Date:
Subject: Function / trigger