From: Ben.Westgarth@facs.gov.au
To: ums san sankari <umashankarit@rediffmail.com>
Cc: pgsql-php@postgresql.org
Subject: Re: Encrypt given Data
Date: Wed, 17 Oct 2001 09:01:59 +1000
Message-ID: <CA256AE7.007EC408.00@facs.gov.au> (raw)
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
php.net. 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@rediffmail.com> on 16/10/2001 22:16:13
Please respond to "ums san sankari" <umashankarit@rediffmail.com>
To: pgsql-php@postgresql.org
cc: (bcc: Ben Westgarth/User/FaCS)
Subject: [PHP] Encrypt given Data
Greetings!
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
-Uma
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.orgAttachments:
att1.eml (application/octet-stream, 2.6K) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: Ben.Westgarth@facs.gov.au, umashankarit@rediffmail.com
Subject: Re: Encrypt given Data
In-Reply-To: <CA256AE7.007EC408.00@facs.gov.au>
References: <CA256AE7.007EC408.00@facs.gov.au>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox