Encryption

This is a discussion on Encryption within the PHP Language forums, part of the PHP Programming Forums category; Hello group, to give access to some of my pages I use a loginscript. When people register the password is ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-04-2004
RotterdamStudents
 
Posts: n/a
Default Encryption

Hello group,

to give access to some of my pages I use a loginscript. When people register
the password is encrypted with the md5 function: $passw=md5("$inv_passw");

Now I want to have the user to ask for his password when he lost it by mail.
So the encrypted password needs to be decrypted. I thought to use the next
command:
$uncrypted = decrypt_md5($assw);

but this gives a fault:
Fatal error: Call to undefined function: decrypt_md5()

Can somebody tell me what I do wrong.

Thnx in advance.

RotterdamStudents


Reply With Quote
  #2 (permalink)  
Old 05-04-2004
Jeppe Uhd
 
Posts: n/a
Default Re: Encryption

RotterdamStudents wrote:
> Hello group,
>
> to give access to some of my pages I use a loginscript. When people
> register the password is encrypted with the md5 function:
> $passw=md5("$inv_passw");
>
> Now I want to have the user to ask for his password when he lost it
> by mail. So the encrypted password needs to be decrypted. I thought
> to use the next command:
> $uncrypted = decrypt_md5($assw);
>
> but this gives a fault:
> Fatal error: Call to undefined function: decrypt_md5()
>
> Can somebody tell me what I do wrong.


md5 -can't- be decrypted... It's a one-way hash function

--
MVH Jeppe Uhd - NX http://nx.dk
Webhosting for nørder og andet godtfolk


Reply With Quote
  #3 (permalink)  
Old 05-04-2004
Chris Hope
 
Posts: n/a
Default Re: Encryption

Jeppe Uhd wrote:

>> to give access to some of my pages I use a loginscript. When people
>> register the password is encrypted with the md5 function:
>> $passw=md5("$inv_passw");
>>
>> Now I want to have the user to ask for his password when he lost it
>> by mail. So the encrypted password needs to be decrypted. I thought
>> to use the next command:
>> $uncrypted = decrypt_md5($assw);
>>
>> but this gives a fault:
>> Fatal error: Call to undefined function: decrypt_md5()
>>
>> Can somebody tell me what I do wrong.

>
> md5 -can't- be decrypted... It's a one-way hash function


And there's no such function as decrypt_md5(), hence the error message :)

If you want to check a function go to www.php.net/function_name where
function_name is the name of the function you want more info on. If the
function exists you'll be taken directly to the manual page. If it doesn't
then you'll be given a list of functions with similar names.
Reply With Quote
  #4 (permalink)  
Old 05-04-2004
Berislav Lopac
 
Posts: n/a
Default Re: Encryption

RotterdamStudents wrote:
> Hello group,
>
> to give access to some of my pages I use a loginscript. When people
> register the password is encrypted with the md5 function:
> $passw=md5("$inv_passw");
>
> Now I want to have the user to ask for his password when he lost it
> by mail. So the encrypted password needs to be decrypted. I thought
> to use the next command:
> $uncrypted = decrypt_md5($assw);
>
> but this gives a fault:
> Fatal error: Call to undefined function: decrypt_md5()
>
> Can somebody tell me what I do wrong.


Most of all, you're trying to decrypt.

Instead of this, when someone loses the password you should create a new one
and send it, and write that new one into database, encrypted.

Berislav

--
If the Internet is a Marx Brothers movie, and Web, e-mail, and IRC are
Groucho, Chico, and Harpo, then Usenet is Zeppo.


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 08:25 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0