commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Neidhart <thomas.neidh...@gmail.com>
Subject Re: [codec] MD5 impls
Date Thu, 30 Aug 2012 17:58:54 GMT
On 08/30/2012 06:31 PM, Gary Gregory wrote:
> On Thu, Aug 30, 2012 at 11:53 AM, sebb <sebbaz@gmail.com> wrote:
> 
>> On 30 August 2012 16:51, Gary Gregory <garydgregory@gmail.com> wrote:
>>> On Thu, Aug 30, 2012 at 11:41 AM, sebb <sebbaz@gmail.com> wrote:
>>>
>>>> On 30 August 2012 16:01, Gary Gregory <garydgregory@gmail.com> wrote:
>>>>> All,
>>>>>
>>>>> Do we want both the MD5 in org.apache.commons.codec.digest.Md5Crypt
>> and
>>>> the
>>>>> one accessed through org.apache.commons.codec.digest.DigestUtils?
>>>>>
>>>>> Thouhgts?
>>>>
>>>> Are they the same implementation?
>>>>
>>>
>>> Well, no, org.apache.commons.codec.digest.Md5Crypt is new in trunk, it
>> has
>>> not been in a release yet.
>>
>> So why has it been added if there was already an implementation?
>>
> 
> 'twas an oversight.

it is not the same.

MD5Crypt uses the MD5 MessageDigest algorithm to produce a crypt variant
based on it.

We could replace the call in MD5Crypt

   MessageDigest ctx = MessageDigest.getInstance(MD5_ALGORITHM);

with

   MessageDigest ctx = DigestUtils.getMd5Digest();

but then we would have to update the exception to be thrown
(NoSuchAlgorithmException vs. RuntimeException)

Thomas

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


Mime
View raw message