commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 20990] New: - Add StringUtils.hash(String) and StringUtils.toHex(byte[]) methods.
Date Sun, 22 Jun 2003 00:06:16 GMT
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


Mime
View raw message