#1 md5() and hash() functiosn used

open
nobody
None
5
2004-02-12
2004-02-12
Anonymous
No

Hello All, i am trying to figure a piece of code out that i
found a program using. I would like to figure out how to
use these functions. I know that the md5 function will
always give you a specific encryption for a certain word.
And i know how the hash() works. What i don't know is
how the program gets it's answer, because i get a
different answer, and i have looked in the included files
and found only one line that pertains to this. This is the
code that i have.

This line in the included file inc/common.php
$env[dummy] = time();

This is from original register.php

# generate a random password
$rand = rand(1, $env[dummy]);
$hash = md5($rand);
$passwd1 = substr($hash, 0, 8); # new password

And this should be my new pasword. The program that
uses this gives me the password encryption as
4efd82525698b20a, when i run the code that i found in
the prgram I get somwthign like 4ef26e59.

Now when i look at the ode above it uses a random
varible named time, so it doesn't make sense because it
is not even using the password text field. I am very
confused.
can you please explain how you have the password
setup here

ant help would be appreciated.

Discussion