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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to