On Mon, Jun 6, 2011 at 5:58 PM, Nikolay Elenkov
<nikolay.elen...@gmail.com> wrote:
> On Sat, Jun 4, 2011 at 7:16 AM, Ratfish <aaron.rad...@gmail.com> wrote:
>> I've got a problem where a MD5 Hash function in Android generates a
>> different hash than a similar routine in .NET.  The Android hash is
>> calculated as "J0t��j#߸� bq- �", while the .NET hash is calculated as
>> "SjB0j+xqI9+4hxticS0Cjw==".  Is this due to a character set issue?
>> Unicode versus non-unicode?
>>
>
> This has little to do with Android, and what you have is an HMAC, not
> a hash function. To get the same result you need to properly Base64
> encode the bytes produced from your function. Change the line
> below to do Base64 encoding, it looks like it's just converting
> the bytes to a string.
>
>>   String sEncodedText = EncodingUtils.getString(encodedTextBytes,
>> "BASE64");
>


And don't post the same question three times.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to