System\Security\Cryptography\Xml\C14NAncestralNamespaceContextManager.cs (12)
19if (Utils.HasNamespacePrefix((XmlAttribute)a, nsPrefix))
33if (Utils.IsNonRedundantNamespaceDecl(local, rAncestral))
36if (Utils.IsXmlNamespaceNode(local))
46if (uAncestral != null && uDepth > rDepth && Utils.IsNonRedundantNamespaceDecl(uAncestral, rAncestral))
48if (Utils.IsXmlNamespaceNode(uAncestral))
65XmlAttribute? rAncestral = GetNearestRenderedNamespaceWithMatchingPrefix(Utils.GetNamespacePrefix(attrib), out rDepth);
66if (Utils.IsNonRedundantNamespaceDecl(attrib, rAncestral))
68nsLocallyDeclared.Remove(Utils.GetNamespacePrefix(attrib));
69if (Utils.IsXmlNamespaceNode(attrib))
82GetNamespaceToRender(Utils.GetNamespacePrefix(attrib), attrListToRender, nsListToRender, nsLocallyDeclared);
89nsLocallyDeclared.Add(Utils.GetNamespacePrefix(attr), attr);
94nsLocallyDeclared.Add(Utils.GetNamespacePrefix(attr), attr);
System\Security\Cryptography\Xml\EncryptedKey.cs (5)
60Id = Utils.GetAttribute(value, "Id", EncryptedXml.XmlEncNamespaceUrl);
61Type = Utils.GetAttribute(value, "Type", EncryptedXml.XmlEncNamespaceUrl);
62MimeType = Utils.GetAttribute(value, "MimeType", EncryptedXml.XmlEncNamespaceUrl);
63Encoding = Utils.GetAttribute(value, "Encoding", EncryptedXml.XmlEncNamespaceUrl);
64Recipient = Utils.GetAttribute(value, "Recipient", EncryptedXml.XmlEncNamespaceUrl);
System\Security\Cryptography\Xml\Reference.cs (25)
213_id = Utils.GetAttribute(value, "Id", SignedXml.XmlDsigNamespaceUrl);
214_uri = Utils.GetAttribute(value, "URI", SignedXml.XmlDsigNamespaceUrl);
215_type = Utils.GetAttribute(value, "Type", SignedXml.XmlDsigNamespaceUrl);
216if (!Utils.VerifyAttributes(value, s_expectedAttrNames))
234if (!Utils.VerifyAttributes(transformsElement, (string[]?)null))
245if (transformNodes.Count > Utils.MaxTransformsPerReference)
252string? algorithm = Utils.GetAttribute(transformElement, "Algorithm", SignedXml.XmlDsigNamespaceUrl);
253if (algorithm == null || !Utils.VerifyAttributes(transformElement, "Algorithm"))
281string idref = Utils.ExtractIdFromLocalUri(_uri);
316_digestMethod = Utils.GetAttribute(digestMethodElement, "Algorithm", SignedXml.XmlDsigNamespaceUrl)!;
317if (_digestMethod == null || !Utils.VerifyAttributes(digestMethodElement, "Algorithm"))
326_digestValue = Convert.FromBase64String(Utils.DiscardWhiteSpaces(digestValueElement.InnerText));
327if (!Utils.VerifyAttributes(digestValueElement, (string[]?)null))
401XmlDocument docWithNoComments = Utils.DiscardComments(Utils.PreProcessDocumentInput(document, resolver!, baseUri));
408string idref = Utils.GetIdFromLocalUri(_uri, out bool discardComments);
417hashInputStream = TransformChain.TransformToOctetStream(Utils.PreProcessDocumentInput(document, resolver!, baseUri), resolver, baseUri);
423_namespaces = Utils.GetPropagatedAttributes(elem.ParentNode as XmlElement);
433if ((tempElem != null) && (Utils.HasAttribute(tempElem, "Id", SignedXml.XmlDsigNamespaceUrl))
434&& (Utils.GetAttribute(tempElem, "Id", SignedXml.XmlDsigNamespaceUrl)!.Equals(idref)))
438_namespaces = Utils.GetPropagatedAttributes(_signedXml._context);
448XmlDocument normDocument = Utils.PreProcessElementInput(elem, resolver!, baseUri);
450Utils.AddNamespaces(normDocument.DocumentElement!, _namespaces);
456XmlDocument docWithNoComments = Utils.DiscardComments(normDocument);
473hashInputStream = TransformChain.TransformToOctetStream(Utils.PreProcessElementInput((XmlElement)_refTarget!, resolver!, baseUri), resolver, baseUri);
System\Security\Cryptography\Xml\Utils.cs (6)
415Utils.SBReplaceCharWithString(sb, (char)13, "
");
506if (!Utils.IsCommittedNamespace(ancestorElement, ancestorElement.Prefix, ancestorElement.NamespaceURI))
509if (!Utils.IsRedundantNamespace(ancestorElement, ancestorElement.Prefix, ancestorElement.NamespaceURI))
539if (!Utils.IsCommittedNamespace(ancestorElement, attrib.Prefix, attrib.NamespaceURI))
542if (!Utils.IsRedundantNamespace(ancestorElement, attrib.Prefix, attrib.NamespaceURI))
725string hexString = Utils.DiscardWhiteSpaces(s);