in reply to Re: MD5 -- not digest::md5
in thread MD5 -- not digest::md5

I'm not sure what your point is. The OP already knows "it doesn't work". Assuming that Digest::MD5::md5 does "work", I fail to see what your suggestion offers the OP in finding his problem.

Replies are listed 'Best First'.
Re^3: MD5 -- not digest::md5
by roboticus (Chancellor) on Aug 16, 2009 at 12:58 UTC
    JavaFan:

    The program in the OP doesn't show both his code and the use of the reference code. I've seen far too many cases where a tiny difference is unnoticed (perhaps an extra blank, a fat-fingered character or something) that makes the difference. By calling both the reference function and the new function in the same program it's easier to confirm that the *exact* same data is passed to both.

    In fact, I had that problem occur last year. For my son's Webelos troop we were working on encryption and decryption of messages. A similar mistake I made caused a problem, and we could decrypt only half of the message I had prepared.

    ...roboticus