You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/06/22 02:06:16 UTC
DO NOT REPLY [Bug 20990] New: -
Add StringUtils.hash(String) and StringUtils.toHex(byte[]) methods.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20990>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20990
Add StringUtils.hash(String) and StringUtils.toHex(byte[]) methods.
Summary: Add StringUtils.hash(String) and
StringUtils.toHex(byte[]) methods.
Product: Commons
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Enhancement
Priority: Other
Component: Lang
AssignedTo: commons-dev@jakarta.apache.org
ReportedBy: dgraham@apache.org
The Struts TokenProcessor class has a method toHex(byte[]) that turns the given
byte[] into a String of hexadecimal digits. This functionality is not Struts
specific and I've found uses for it outside of Struts. I've written a
hash(String) method that takes a clear text String and runs it through an MD5
hash and then the toHex() method to output a 32 character String of hexadecimal
digits. This has been useful in hashing passwords and other sensitive data.
If there's interest in adding this to commons-lang, I will create a patch file
against StringUtils and StringUtilsTest.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org