是否可以将http://www.w3.org/2006/12/xml-c14n11 CanonicalizationMethod与SignedXml一起使用?
SignedXml signedXml = new SignedXml(xmlDoc);
signedXml.SignedInfo.CanonicalizationMethod = "http://www.w3.org/2006/12/xml-c14n11";
投掷
System.Security.Cryptography.CryptographicException: Could not create the XML tr
ansformation identified by the URI http://www.w3.org/2006/12/xml-c14n11.
谢谢!
答案 0 :(得分:1)
看起来它还没有被.NET实现。
你可能需要像这样创建自己的Transform类:
public class XmlDsigC14N11Transform: XmlDsigC14NTransform
{
public override void LoadInput(object obj)
{
//do something here
base.LoadInput(obj);
}
public override object GetOutput()
{
//do something here
return base.GetOutput();
}
}
并将您的转换映射到" http://www.w3.org/2006/12/xml-c14n11"。
CryptoConfig.AddAlgorithm(typeof(XmlDsigC14N11Transform), "http://www.w3.org/2006/12/xml-c14n11");