in reply to Re: Would Like Recommendation for an SHA256 module
in thread Would Like Recommendation for an SHA256 module
I agree with ikegami. Digest::SHA is the way to go. It supports all the NIST SHA's. It does require a C compiler, though.
The reason why you read that MD5 shouldn't be used for new development is that the MD5 algorithm is only defined for strings of bytes and can't be used in strings that contain chars with numbers greater than 255---in other words, a Unicode problem.
No! That's not the reason at all! MD5 and SHA-1 should be phased out because MD5 and SHA-1 have been broken. (Schneier also comments on the practical consequences of this break.)
While it's true that MD5 can only hash strings of bytes (as opposed to strings of characters), the same is true of SHA-* as well. Fortunately, it's easy to convert strings of characters into strings of bytes. The process is called encoding, and a convenient encoding is UTF-8. Similarly, the process of converting data structures into strings of bytes is called serialization.
Update: Added links to references.
Update: Quoted parent in order to provide context, since the parent was rewritten.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Would Like Recommendation for an SHA256 module
by jdtoronto (Prior) on Aug 01, 2006 at 06:21 UTC | |
by TheEnigma (Pilgrim) on Aug 01, 2006 at 16:00 UTC |