.NET's CryptoStream vs Java's .update()
From: Brandon Bloom (BrandonBloom_at_discussions.microsoft.com)
Date: 11/19/04
- Next message: Joe Kaplan \(MVP - ADSI\): "Re: security exception for aspx page"
- Previous message: InDllImportHell: "Calling mscorlib from web - Security Errors"
- Next in thread: Rob Teixeira: "Re: .NET's CryptoStream vs Java's .update()"
- Reply: Rob Teixeira: "Re: .NET's CryptoStream vs Java's .update()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 19 Nov 2004 12:35:01 -0800
I am porting a Java application to .NET and came across a problem working
with .NET’s MD5CryptoServiceProvider producing a different result from Java’s
MessageDigest. I was hoping someone could help me as this as the only thread
I could find that tackled the subject directly:
I have a Java application that calls MessageDigest.getInstance("MD5") and
then calls .update() three times on the MessageDigest instance returned.
Afterwards, .digest() is called. In my C# application I create a
MD5CryptoServiceProvider and CryptoStream as you suggested and call .Write()
three times with the same information. After carefully checking all three
calls and the data passed to each numerous times (with the understanding that
Java uses signed bytes where as C# doesn’t), I have found no differences, but
the C# version returns a different Hash from the .Hash property. Why? How can
I correct this?
Any help would be greatly appreciated.
Thank you for your time,
Brandon Bloom
- Next message: Joe Kaplan \(MVP - ADSI\): "Re: security exception for aspx page"
- Previous message: InDllImportHell: "Calling mscorlib from web - Security Errors"
- Next in thread: Rob Teixeira: "Re: .NET's CryptoStream vs Java's .update()"
- Reply: Rob Teixeira: "Re: .NET's CryptoStream vs Java's .update()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|