For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > February 2008 > Re: [PHP-DB] Password decryption









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] Password decryption
Matteo Cisilino

2008-02-17, 8:00 am

Nasreen Laghari wrote:
> Hi,
>
> I'm junior in PHP and stuck on Encryption.
>
> I have encrypted password using SQL :
>
> $query = "insert into user (userid,password,) values ('$username',Password('$pass'));";
>
> Which is working perfect. Now I'm working on Login page where I have to compare passwords.. As password in database is encrypted so I need to decrypt it back for compression. I have tried the flowing but not working.
>
> if ($pwd != Password("$info['password']"))
> {
> echo("-----------------");
> //header("Location: abuse.php");
> }
>
> and
>
> if ($pwd != $info(Password("['password']"))
> {
> echo("-----------------");
> //header("Location: abuse.php");
> }
>
> Could any one please help..
>
> Thank you
>
>
> ________________________________________
________________________________________
____
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06...tDypao8Wcj9tAcJ
>
>

the password is encrypted one way ( usually md5() ) so you must compare
the encrypted hashes



--
Matteo Cisilino

Blog : http://matteo.cisilino.com

--------------------------------------------------------------------
CONFIDENTIALITY NOTICE
This message and its attachments are addressed solely to the persons
above and may contain confidential information. If you have received
the message in error, be informed that any use of the content hereof
is prohibited. Please return it immediately to the sender and delete
the message. Should you have any questions, please contact us by
replying to matteo@cisilino.com
Thank you
--------------------------------------------------------------------
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com