commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Dribin <dave...@dribin.org>
Subject [lang] DigestUtils?
Date Wed, 01 Oct 2003 17:28:30 GMT
Would there be interest in a DigestUtils class that simplifies using
java.security.MessageDigest objects?  Personally, I find it a huge
pain to do a simple MD5 digest.  Also, it's often necessary to
get the hex representation of the digest.  For starters, I would
propose the following API:

    public static String md5hex(String data);
    public static String md5hex(bytes[] data);

    public static byte[] md5(String data);
    public static byte[] md5(bytes[] data);

There could be similar methods for SHA digests.  I already have a
non-polished implementation that I would be willing to submit (after
polishing).

-Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message