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)
63Id = Utils.GetAttribute(value, "Id", EncryptedXml.XmlEncNamespaceUrl);
64Type = Utils.GetAttribute(value, "Type", EncryptedXml.XmlEncNamespaceUrl);
65MimeType = Utils.GetAttribute(value, "MimeType", EncryptedXml.XmlEncNamespaceUrl);
66Encoding = Utils.GetAttribute(value, "Encoding", EncryptedXml.XmlEncNamespaceUrl);
67Recipient = Utils.GetAttribute(value, "Recipient", EncryptedXml.XmlEncNamespaceUrl);
System\Security\Cryptography\Xml\Reference.cs (25)
216_id = Utils.GetAttribute(value, "Id", SignedXml.XmlDsigNamespaceUrl);
217_uri = Utils.GetAttribute(value, "URI", SignedXml.XmlDsigNamespaceUrl);
218_type = Utils.GetAttribute(value, "Type", SignedXml.XmlDsigNamespaceUrl);
219if (!Utils.VerifyAttributes(value, s_expectedAttrNames))
237if (!Utils.VerifyAttributes(transformsElement, (string[]?)null))
248if (transformNodes.Count > Utils.MaxTransformsPerReference)
255string? algorithm = Utils.GetAttribute(transformElement, "Algorithm", SignedXml.XmlDsigNamespaceUrl);
256if (algorithm == null || !Utils.VerifyAttributes(transformElement, "Algorithm"))
284string idref = Utils.ExtractIdFromLocalUri(_uri);
319_digestMethod = Utils.GetAttribute(digestMethodElement, "Algorithm", SignedXml.XmlDsigNamespaceUrl)!;
320if (_digestMethod == null || !Utils.VerifyAttributes(digestMethodElement, "Algorithm"))
329_digestValue = Convert.FromBase64String(Utils.DiscardWhiteSpaces(digestValueElement.InnerText));
330if (!Utils.VerifyAttributes(digestValueElement, (string[]?)null))
407XmlDocument docWithNoComments = Utils.DiscardComments(Utils.PreProcessDocumentInput(document, resolver!, baseUri));
414string idref = Utils.GetIdFromLocalUri(_uri, out bool discardComments);
423hashInputStream = TransformChain.TransformToOctetStream(Utils.PreProcessDocumentInput(document, resolver!, baseUri), resolver, baseUri);
429_namespaces = Utils.GetPropagatedAttributes(elem.ParentNode as XmlElement);
439if ((tempElem != null) && (Utils.HasAttribute(tempElem, "Id", SignedXml.XmlDsigNamespaceUrl))
440&& (Utils.GetAttribute(tempElem, "Id", SignedXml.XmlDsigNamespaceUrl)!.Equals(idref)))
444_namespaces = Utils.GetPropagatedAttributes(_signedXml._context);
454XmlDocument normDocument = Utils.PreProcessElementInput(elem, resolver!, baseUri);
456Utils.AddNamespaces(normDocument.DocumentElement!, _namespaces);
462XmlDocument docWithNoComments = Utils.DiscardComments(normDocument);
479hashInputStream = TransformChain.TransformToOctetStream(Utils.PreProcessElementInput((XmlElement)_refTarget!, resolver!, baseUri), resolver, baseUri);
System\Security\Cryptography\Xml\Utils.cs (6)
427Utils.SBReplaceCharWithString(sb, (char)13, "
");
518if (!Utils.IsCommittedNamespace(ancestorElement, ancestorElement.Prefix, ancestorElement.NamespaceURI))
521if (!Utils.IsRedundantNamespace(ancestorElement, ancestorElement.Prefix, ancestorElement.NamespaceURI))
551if (!Utils.IsCommittedNamespace(ancestorElement, attrib.Prefix, attrib.NamespaceURI))
554if (!Utils.IsRedundantNamespace(ancestorElement, attrib.Prefix, attrib.NamespaceURI))
737string hexString = Utils.DiscardWhiteSpaces(s);