Re: SignHash

From: Sitaraman (l.sitaraman@verizon.net)
Date: 09/19/02


From: "Sitaraman" <l.sitaraman@verizon.net>
Date: Wed, 18 Sep 2002 21:12:59 -0400


Hi
I am still getting this error even after using the OIDs that you gave.
Any thoughts..
Thanks
Sitaraman

"Nathan Silva" <nathan_silva@hotmail.com> wrote in message
news:OCDFsWEWCHA.436@tkmsftngp10...
> I know I'm replying to an old message, but hopefully this will help
> someone. The second argument to SignHash needs to be an OID (X.208
> Object Identifier). Here are the OIDs for MD5 and SHA1:
>
> MD5: 1.2.840.113549.2.5
> SHA1: 1.3.14.3.2.26
>
> If you pass those strings as the second argument to SignHash, it should
> work.
>
> Really, the SignHash function should be friendlier and accept the
> strings "MD5" and "SHA1" or at least typeof(MD5) and typeof(SHA1). But
> it doesn't.
>
> Nate
>
> Theodoros A. Savvides wrote:
> > I am trying to Compute the hash (digest value) of some data (xml
canonical
> > document) in .NET and then
> > to sign the data using a private key. I have created the digest using
the
> > SHA1CryptoServiceProvider but
> > when i run the above function from RSACryptoserviceProvider, it does not
> > work. Even setting the algorithm
> > to nothing, based on documentation it should use the default algorithm
which
> > is SHA1, but it doesn't. I get
> > an error that "Object identifier (OID) is unknown", is there a bug in
.NET?
> > Is there a fix for this or another
> > way to do this?
> >
> > Thanks
> >
> > Theo.
> >
> >
>


Loading