On 08/30/2012 06:31 PM, Gary Gregory wrote:
> On Thu, Aug 30, 2012 at 11:53 AM, sebb <seb...@gmail.com> wrote:
> 
>> On 30 August 2012 16:51, Gary Gregory <garydgreg...@gmail.com> wrote:
>>> On Thu, Aug 30, 2012 at 11:41 AM, sebb <seb...@gmail.com> wrote:
>>>
>>>> On 30 August 2012 16:01, Gary Gregory <garydgreg...@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-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to