On 3/15/07, Jarlo Nicholas Solde <[EMAIL PROTECTED]> wrote:
     I am created a Online Inquiry System but my problem is how to encrypt
my password i am using MYSQL Database in the database the
password field is decnrcypt but my probelm is what is the code to encrpyt in
php do you have an idea.

It depends on what algorithm you want to "encrypt" it with?

You can either use MD5 or SHA-1 - just use the built-in md5() or
sha1() functions of MySQL. The hash should be the same whether you're
doing it via PHP or MySQL.

mysql> SELECT md5('password');
+----------------------------------+
| md5('password')                  |
+----------------------------------+
| 5f4dcc3b5aa765d61d8327deb882cf99 |
+----------------------------------+
1 row in set (0.00 sec)

mysql> SELECT sha1('password');
+------------------------------------------+
| sha1('password')                         |
+------------------------------------------+
| 5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8 |
+------------------------------------------+
1 row in set (0.00 sec)


--
Matt Arnilo S. Baluyos <[EMAIL PROTECTED]>
http://www.onxiam.com/people/mbaluyos/

v3sw3CH+Rhw2ln5pr6OPck5ma7u5Lw5Xm+7l7CRi2e6t5Xb7Oen4g5aIs4r3p6 hackerkey.com
        gpg --keyserver pgp.mit.edu --recv-keys 171CD03E
_________________________________________________
Kagay-Anon Linux Users' Group (KLUG) Mailing List
[email protected] (http://cdo.linux.org.ph)
Searchable Archives: http://archives.free.net.ph

Reply via email to