Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Sat, 17 May 2008 02:42:53 -0700 (PDT),    group: microsoft.public.dotnet.security        back       


XAdES - CertDigest element   
Hi,
I have a question about XAdES CertDigest element. Site:
http://www.w3.org/TR/XAdES/#Syntax_for_XAdES_The_SigningCertificate_element
tells:
"The element CertDigest contains the digest of one of the certificates
referenced in the sequence. It contains two elements: DigestMethod
indicates the digest algorithm and DigestValue contains the value of
the digest."

I want to manually compute digest value but I don't know which data I
should choose.
XmlDsigC14NTransform class has a method GetDigestedOutput() but I
can't find anything about LoadInput data.

Thanks in advance.
JB
date: Sat, 17 May 2008 02:42:53 -0700 (PDT)   author:   unknown

RE: XAdES - CertDigest element   
Hi from Spain,

you can load the certificate into an X509Certificate2 object, for example 
using a BinaryReader object. Later, you can generate the hash:

X509Certificate2 x509=new X509Certificate2();

//now you have to load the certificate into the object, reading from a file
//Read the help for loading X509 certificates from files. For example, the
//method Import of X509Certificate2 object ;-D. 

SHA1 sha=new SHA1CryptoServiceProvider();
byte[] hash;
hash=sha.ComputeHash(x509.RawData);

Try!!





"jacek.bubak@gmail.com" wrote:

> Hi,
> I have a question about XAdES CertDigest element. Site:
> http://www.w3.org/TR/XAdES/#Syntax_for_XAdES_The_SigningCertificate_element
> tells:
> "The element CertDigest contains the digest of one of the certificates
> referenced in the sequence. It contains two elements: DigestMethod
> indicates the digest algorithm and DigestValue contains the value of
> the digest."
> 
> I want to manually compute digest value but I don't know which data I
> should choose.
> XmlDsigC14NTransform class has a method GetDigestedOutput() but I
> can't find anything about LoadInput data.
> 
> Thanks in advance.
> JB
> 
>
date: Tue, 10 Jun 2008 08:23:01 -0700   author:   Jeancc

Re: XAdES - CertDigest element   
Thanks a lot Jeancc.



On 10 Cze, 17:23, Jeancc  wrote:
> Hi from Spain,
>
> you can load the certificate into an X509Certificate2 object, for example
> using a BinaryReader object. Later, you can generate the hash:
>
> X509Certificate2 x509=new X509Certificate2();
>
> //now you have to load the certificate into the object, reading from a file
> //Read the help for loading X509 certificates from files. For example, the
> //method Import of X509Certificate2 object ;-D.
>
> SHA1 sha=new SHA1CryptoServiceProvider();
> byte[] hash;
> hash=sha.ComputeHash(x509.RawData);
>
> Try!!
>
>
>
> "jacek.bu...@gmail.com" wrote:
> > Hi,
> > I have a question about XAdES CertDigest element. Site:
> >http://www.w3.org/TR/XAdES/#Syntax_for_XAdES_The_SigningCertificate_e...
> > tells:
> > "The element CertDigest contains the digest of one of the certificates
> > referenced in the sequence. It contains two elements: DigestMethod
> > indicates the digest algorithm and DigestValue contains the value of
> > the digest."
>
> > I want to manually compute digest value but I don't know which data I
> > should choose.
> > XmlDsigC14NTransform class has a method GetDigestedOutput() but I
> > can't find anything about LoadInput data.
>
> > Thanks in advance.
> > JB- Ukryj cytowany tekst -
>
> - Poka¿ cytowany tekst -
date: Thu, 19 Jun 2008 01:05:07 -0700 (PDT)   author:   JB

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us