Skip site navigation (1) Skip section navigation (2)

Re: Encrypt given Data

From: Ben(dot)Westgarth(at)facs(dot)gov(dot)au
To: "ums san sankari" <umashankarit(at)rediffmail(dot)com>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: Encrypt given Data
Date: 2001-10-16 23:01:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-php

First of all, this is a list dedicated to php and POSTGRESQL, not Mysql. But
because you are using php...

It completely depends on how much security matters to you.

For most purposes, the php function crypt( ) will do the job. It is pretty well
covered by most of the php resources out there which is really where you should
check first.

Try the following:

$encryptedPass = crypt($password, '.v');

This encrypts the string $password using the 2 character salt '.v' -you can
change these characters as you like.

AFAIK there is no way to decrypt this as such, so...

- take user's login password and encrypt it using the same two character salt.
- compare it against the encrypted password already stored in the database.

If you need to more about this there are plenty of resources out there including And remember that in future this list is for POSTGRESQL users. There
are other lists where you can post your mysql related questions.

"ums san sankari" <umashankarit(at)rediffmail(dot)com> on 16/10/2001 22:16:13

Please respond to "ums san sankari" <umashankarit(at)rediffmail(dot)com>

To:   pgsql-php(at)postgresql(dot)org
cc:    (bcc: Ben Westgarth/User/FaCS)

Subject:  [PHP] Encrypt given Data


    Can u spent some times for me ?. I need the coding to encrypt the data given
by the user and i have to store that details in mysql database.Send the coding
as soon as possible.and also i have to decrypt the data


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

Attachment: att1.eml
Description: application/octet-stream (2.6 KB)

pgsql-php by date

Next:From: Duncan Adams (DNS)Date: 2001-10-17 08:58:58
Subject: Re: Retrieving a list of tables
Previous:From: David C. BrownDate: 2001-10-16 20:09:13
Subject: Retrieving a list of tables

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group