[Mono-list] Mono support of W3C xmldsig?
John Gonsalves
darvain1@hotmail.com
Fri, 16 Jul 2004 15:02:50 -0700
Will the following .NET code work with Mono?
public class XmlDigitalSigning
{
public const String MS_DEF_PROV = "Microsoft Base
Cryptographic Provider v1.0";
public const int PROV_RSA_FULL = 1;
public SignedXml Sign(String Uri, XmlDocument doc, RSACryptoServiceProvider
rsa, SigType type, String serialNumber)
{
SignedXml xmlSign = new SignedXml();
xmlSign.SigningKey = rsa;
Reference reference = new Reference();
if (type == SigType.Detached)
{
reference.Uri = Uri;
}
else if (type == SigType.Enveloping)
{
DataObject obj = new DataObject();
obj.Data = doc.ChildNodes;
obj.Id = serialNumber;
reference.Uri = "#" + serialNumber;
xmlSign.AddObject(obj);
}
xmlSign.AddReference(reference);
xmlSign.ComputeSignature();
return xmlSign;
}
}
_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/