Re: .NET's CryptoStream vs Java's .update()
From: Brandon Bloom (BrandonBloom_at_discussions.microsoft.com)
Date: 11/20/04
- Next message: Rajagopal: "Security problem..."
- Previous message: Brandon Bloom: "Re: .NET's CryptoStream vs Java's .update()"
- In reply to: Rob Teixeira: "Re: .NET's CryptoStream vs Java's .update()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Fri, 19 Nov 2004 16:05:04 -0800
Actually no.... the 2nd term did not evaluate the same in each. I
investigated a bit further and solved the issue.
Sorry about posting prematurely.
Thanks anways for sparking the line of debugging that solved it.
"Rob Teixeira" wrote:
> Two questions to help start troubleshooting this...
> 1) what happens if you update only once and then digest? Do you get the same
> result?
> 2) what is the size of the data for each update?
>
> -Rob Teixeira
>
> "Brandon Bloom" <BrandonBloom@discussions.microsoft.com> wrote in message
> news:1C8BF651-8087-4E21-9B17-683ED1FC203B@microsoft.com...
> > 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:
> >
> >
> http://groups.google.com/groups?hl=en&lr=&c2coff=1&safe=off&threadm=OjHc2kP6DHA.3360%40tk2msftngp13.phx.gbl&rnum=5&prev=/groups%3Fq%3Dmd5%2B.hash%2Bcryptostream%26hl%3Den%26lr%3D%26c2coff%3D1%26safe%3Doff%26selm%3DOjHc2kP6DHA.3360%2540tk2msftngp13.phx.gbl%26rnum%3D5
> >
> > 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: Rajagopal: "Security problem..."
- Previous message: Brandon Bloom: "Re: .NET's CryptoStream vs Java's .update()"
- In reply to: Rob Teixeira: "Re: .NET's CryptoStream vs Java's .update()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]