in reply to Re: Why applying MD5 hash twice?
in thread Why applying MD5 hash twice?

I'd need to dig through through my notes to be sure, but I used a SHA very much like this years ago. (I had to support Perl 4 installations and could not require any modules.<shrug/>)

Unfortunately, the one I used had a bug when dealing with long strings. At a glance, I couldn't tell if this one has the problem or not. In that case, I worked with the author of the code to fix the bug and we did use it for years.

However, as mentioned by others, using the CPAN modules would be a much better idea. Believe me, you do not want to try to find a bug in an implementation of a cryptographic hash algorithm.

G. Wade