drrngrvy has asked for the wisdom of the Perl Monks concerning the following question:
I'm pretty new to perl, but I've just managed to make a 'fully funcional' user/identifier script. The only problem I have left is with the Digest module and after searching long and experimenting hard I don't know what the problem is exactly.
I've bascially got two related calls to md5_hex() in the script: one for registering a new name (ie. turning the pass into a hash) and the second for creating a hash when comparing it against the DB, for logging in.
The problem is that the two separate calls to the function (using the same values of course - and I've checked that so many times...) create different hashes. Not only that, but any changes in the script itself causes the md5 function to create different hashes.
Suprisingly, after submitting a login call, the first hash is different to the hash created after refreshing the page (which is the same for all subsequent refreshes). Now, I've sniffed my packets and I know that both outgoing packets are identical in the information they send... which makes it strange that all refreshes of the login script create the same hash, which is different from the first one.
I can't find an answer anywhere else and with no whiff of help from the actual documentation/source code I have trecked to the mountain. Has anyone got any advice?
Cheers
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Digest md5 scratcher
by thor (Priest) on Apr 20, 2005 at 07:46 UTC | |
by drrngrvy (Novice) on Apr 20, 2005 at 08:07 UTC | |
|
Re: Digest md5 scratcher
by BrowserUk (Patriarch) on Apr 20, 2005 at 07:36 UTC |