Thanks Oscar,
Much appreciated
________________________________________
From: Oscar MartÃn [[email protected]]
Sent: Friday, June 28, 2013 1:19 AM
To: Jean-Paul Berthelot
Subject: Re: [dev-crypto-csharp] Calculate RSA SHA-256 digest value
El 27/06/2013 14:09, Jean-Paul Berthelot escribió:
> Hi,
>
>
>
> I have a specific problem I am trying to solve and I was wondering if Bouncy
> Castle could assist me.
>
>
>
> I have a byte array contain an xml element and need to calculate the RSA
> SHA-256 digest value.
>
>
>
> There is a bug in the native Microsoft SHA256Managed class that produces a
> different has to when the digest is calculated via openssl on the command
> line.
>
>
>
>
>
> Does Bouncy Castle offer a class that would take a byte array and the
> calculate the RSA SHA-256 digest?
>
>
>
> I need the algorithm to be equivalent to OpenSSL.
>
>
>
> Could someone please advice me.
>
>
>
> Kind regards,
>
>
>
> Jean-Paul
>
>
Yes.
//Array example
byte[] myArray=System.Text.ASCIIEncoding.UTF8.GetBytes("Test");
byte[]
result=Org.BouncyCastle.Security.DigestUtilities.CalculateDigest("SHA-256",
myArray);