in reply to Digest md5 scratcher
Has anyone got any advice?
Yes. Strip the newline off the end. Or the spaces. Or both.
Either you are passing slightly different data but do not realise (forgetting to chomp or similar), or something is broken.
If you are genuinely getting a different digests from the same data, something is broken in your installation.
If posting a cutdown, preferably standalone version of the code is not an option, then I would suggest that each time you call the md5_hex() function, you trace the value you are passing in and the value returned.
Dumping the input char by char, print LOG unpack 'C*', $userid; is good idea, as it makes spaces and newlines show up more obviously.
|
|---|