Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 99155 invoked from network); 1 Oct 2003 17:44:57 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 1 Oct 2003 17:44:57 -0000 Received: (qmail 42000 invoked by uid 500); 1 Oct 2003 17:44:44 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 41974 invoked by uid 500); 1 Oct 2003 17:44:44 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 41961 invoked from network); 1 Oct 2003 17:44:43 -0000 Received: from unknown (HELO atlanta.seagullsw.com) (12.6.96.143) by daedalus.apache.org with SMTP; 1 Oct 2003 17:44:43 -0000 Received: by atlanta.seagullsw.com with Internet Mail Service (5.5.2656.59) id ; Wed, 1 Oct 2003 13:44:46 -0400 Message-ID: <245A7290F0E0D311BF6E009027E7908B07204845@atlanta.seagullsw.com> From: Gary Gregory To: 'Jakarta Commons Users List' Subject: RE: [lang][codec] DigestUtils? Date: Wed, 1 Oct 2003 13:44:46 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C38843.B42B5170" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C38843.B42B5170 Content-Type: text/plain If we add such a thing to Codec, I would suggest a class hierarchy like: Digest (Abstract) Md5Digest ShaDigest gg > -----Original Message----- > From: Henri Yandell [mailto:bayard@generationjava.com] > Sent: Wednesday, October 01, 2003 10:33 > To: Jakarta Commons Users List > Subject: Re: [lang][codec] DigestUtils? > > > I've got such a thing myself: > > http://www.osjava.org/genjava- > core/apidocs/com/generationjava/security/Securer.html > > and do believe it's a good thing. > > However it's not within Lang's scope. Codec already has the other half the > equation [hex representations] so possibly this could fall withing Codec's > realm. > > Hen > > On Wed, 1 Oct 2003, Dave Dribin wrote: > > > 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 > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-user-help@jakarta.apache.org ------_=_NextPart_001_01C38843.B42B5170--