Have you considered how your code will perform if the MD5 checksum has
*two* leading zeroes?
On Mon, Dec 5, 2011 at 16:14, Tommy Chheng <tommy.chheng(a)gmail.com> wrote:
Thanks, here's a fix when the leading zero is
val md5 = if (result.length % 2 != 0) "0" + result else result
On Mon, Dec 5, 2011 at 3:37 PM, OQ <overlordq(a)gmail.com> wrote:
> On Mon, Dec 5, 2011 at 5:33 PM, Tommy Chheng <tommy.chheng(a)gmail.com> wrote:
>> Thanks, i'll debug this some more. I'm using DBpedia's extraction
>> val md5 = (new BigInteger(1, messageDigest)).toString(16)
> It's eating the leading zero when you're converting it to a BigInt.
> Not sure why, when AFAIK MessageDigest provides provides a toString method()