1 type derived from EncryptedXml
Microsoft.AspNetCore.DataProtection (1)
XmlEncryption\EncryptedXmlDecryptor.cs (1)
89private sealed class EncryptedXmlWithCertificateKeys : EncryptedXml
4 instantiations of EncryptedXml
Microsoft.AspNetCore.DataProtection (1)
XmlEncryption\CertificateXmlEncryptor.cs (1)
93var encryptedXml = new EncryptedXml(xmlDocument);
Microsoft.Extensions.Configuration.Xml (1)
XmlDocumentDecryptor.cs (1)
111EncryptedXml encryptedXml = _encryptedXmlFactory?.Invoke(document) ?? new EncryptedXml(document);
System.Security.Cryptography.Xml (2)
System\Security\Cryptography\Xml\SignedXml.cs (1)
186get => _exml ??= new EncryptedXml(_containingDocument!); // default processing rules
System\Security\Cryptography\Xml\XmlDecryptionTransform.cs (1)
60_exml = new EncryptedXml(_containingDocument!); // default processing rules
84 references to EncryptedXml
Microsoft.AspNetCore.DataProtection (7)
XmlEncryption\CertificateXmlEncryptor.cs (3)
93var encryptedXml = new EncryptedXml(xmlDocument); 95EncryptedXml.ReplaceElement(elementToEncrypt, encryptedData, content: false); 123EncryptedData IInternalCertificateXmlEncryptor.PerformEncryption(EncryptedXml encryptedXml, XmlElement elementToEncrypt)
XmlEncryption\EncryptedXmlDecryptor.cs (2)
18/// An <see cref="IXmlDecryptor"/> that decrypts XML elements by using the <see cref="EncryptedXml"/> class. 81void IInternalEncryptedXmlDecryptor.PerformPreDecryptionSetup(EncryptedXml encryptedXml)
XmlEncryption\IInternalCertificateXmlEncryptor.cs (1)
14EncryptedData PerformEncryption(EncryptedXml encryptedXml, XmlElement elementToEncrypt);
XmlEncryption\IInternalEncryptedXmlDecryptor.cs (1)
13void PerformPreDecryptionSetup(EncryptedXml encryptedXml);
Microsoft.AspNetCore.DataProtection.Tests (4)
XmlEncryption\CertificateXmlEncryptionTests.cs (4)
24mockInternalEncryptor.Setup(o => o.PerformEncryption(It.IsAny<EncryptedXml>(), It.IsAny<XmlElement>())) 25.Returns<EncryptedXml, XmlElement>((encryptedXml, element) => 32mockInternalDecryptor.Setup(o => o.PerformPreDecryptionSetup(It.IsAny<EncryptedXml>())) 33.Callback<EncryptedXml>(encryptedXml =>
Microsoft.Extensions.Configuration.Xml (3)
XmlDocumentDecryptor.cs (3)
26private readonly Func<XmlDocument, EncryptedXml>? _encryptedXmlFactory; 38internal XmlDocumentDecryptor(Func<XmlDocument, EncryptedXml> encryptedXmlFactory) 111EncryptedXml encryptedXml = _encryptedXmlFactory?.Invoke(document) ?? new EncryptedXml(document);
System.Security (1)
System.Security.cs (1)
48[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.Cryptography.Xml.EncryptedXml))]
System.Security.Cryptography.Xml (69)
System\Security\Cryptography\Xml\CipherData.cs (3)
80XmlElement cipherDataElement = (XmlElement)document.CreateElement("CipherData", EncryptedXml.XmlEncNamespaceUrl); 83XmlElement cipherValueElement = document.CreateElement("CipherValue", EncryptedXml.XmlEncNamespaceUrl); 107nsm.AddNamespace("enc", EncryptedXml.XmlEncNamespaceUrl);
System\Security\Cryptography\Xml\CipherReference.cs (4)
58XmlElement referenceElement = document.CreateElement(ReferenceType, EncryptedXml.XmlEncNamespaceUrl); 64referenceElement.AppendChild(TransformChain.GetXml(document, EncryptedXml.XmlEncNamespaceUrl)); 79string? uri = Utils.GetAttribute(value, "URI", EncryptedXml.XmlEncNamespaceUrl); 84nsm.AddNamespace("enc", EncryptedXml.XmlEncNamespaceUrl);
System\Security\Cryptography\Xml\EncryptedData.cs (7)
21nsm.AddNamespace("enc", EncryptedXml.XmlEncNamespaceUrl); 24Id = Utils.GetAttribute(value, "Id", EncryptedXml.XmlEncNamespaceUrl); 25Type = Utils.GetAttribute(value, "Type", EncryptedXml.XmlEncNamespaceUrl); 26MimeType = Utils.GetAttribute(value, "MimeType", EncryptedXml.XmlEncNamespaceUrl); 27Encoding = Utils.GetAttribute(value, "Encoding", EncryptedXml.XmlEncNamespaceUrl); 83XmlElement encryptedDataElement = (XmlElement)document.CreateElement("EncryptedData", EncryptedXml.XmlEncNamespaceUrl); 111XmlElement encryptionPropertiesElement = document.CreateElement("EncryptionProperties", EncryptedXml.XmlEncNamespaceUrl);
System\Security\Cryptography\Xml\EncryptedKey.cs (10)
60nsm.AddNamespace("enc", EncryptedXml.XmlEncNamespaceUrl); 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); 158XmlElement encryptedKeyElement = (XmlElement)document.CreateElement("EncryptedKey", EncryptedXml.XmlEncNamespaceUrl); 188XmlElement encryptionPropertiesElement = document.CreateElement("EncryptionProperties", EncryptedXml.XmlEncNamespaceUrl); 200XmlElement referenceListElement = document.CreateElement("ReferenceList", EncryptedXml.XmlEncNamespaceUrl); 211XmlElement carriedKeyNameElement = (XmlElement)document.CreateElement("CarriedKeyName", EncryptedXml.XmlEncNamespaceUrl);
System\Security\Cryptography\Xml\EncryptedReference.cs (2)
94XmlElement referenceElement = document.CreateElement(ReferenceType, EncryptedXml.XmlEncNamespaceUrl); 116string? uri = Utils.GetAttribute(value, "URI", EncryptedXml.XmlEncNamespaceUrl);
System\Security\Cryptography\Xml\EncryptedXml.cs (26)
287case EncryptedXml.XmlEncDESUrl: 288case EncryptedXml.XmlEncTripleDESUrl: 291case EncryptedXml.XmlEncAES128Url: 292case EncryptedXml.XmlEncAES192Url: 293case EncryptedXml.XmlEncAES256Url: 336nsm.AddNamespace("enc", EncryptedXml.XmlEncNamespaceUrl); 433return EncryptedXml.DecryptKey(encryptedKey.CipherData.CipherValue, (SymmetricAlgorithm)kek); 436fOAEP = (encryptedKey.EncryptionMethod != null && encryptedKey.EncryptionMethod.KeyAlgorithm == EncryptedXml.XmlEncRSAOAEPUrl); 437return EncryptedXml.DecryptKey(encryptedKey.CipherData.CipherValue, (RSA)kek, fOAEP); 455fOAEP = (encryptedKey.EncryptionMethod != null && encryptedKey.EncryptionMethod.KeyAlgorithm == EncryptedXml.XmlEncRSAOAEPUrl); 456return EncryptedXml.DecryptKey(encryptedKey.CipherData.CipherValue, privateKey, fOAEP); 508return EncryptedXml.DecryptKey(encryptedKey.CipherData.CipherValue, symAlg); 564ed.Type = EncryptedXml.XmlEncElementUrl; 565ed.EncryptionMethod = new EncryptionMethod(EncryptedXml.XmlEncAES256Url); 569ek.EncryptionMethod = new EncryptionMethod(EncryptedXml.XmlEncRSA15Url); 575ek.CipherData.CipherValue = EncryptedXml.EncryptKey(aes.Key, rsaPublicKey, false); 616ed.Type = EncryptedXml.XmlEncElementUrl; 617ed.EncryptionMethod = new EncryptionMethod(EncryptedXml.XmlEncAES256Url); 623encryptionMethod = EncryptedXml.XmlEncRSA15Url; 628encryptionMethod = EncryptedXml.XmlEncTripleDESKeyWrapUrl; 638encryptionMethod = EncryptedXml.XmlEncAES128KeyWrapUrl; 641encryptionMethod = EncryptedXml.XmlEncAES192KeyWrapUrl; 644encryptionMethod = EncryptedXml.XmlEncAES256KeyWrapUrl; 660ek.CipherData.CipherValue = (symKey == null ? EncryptedXml.EncryptKey(aes.Key, rsa, false) : EncryptedXml.EncryptKey(aes.Key, symKey)); 680nsm.AddNamespace("enc", EncryptedXml.XmlEncNamespaceUrl);
System\Security\Cryptography\Xml\EncryptionMethod.cs (4)
69XmlElement encryptionMethodElement = (XmlElement)document.CreateElement("EncryptionMethod", EncryptedXml.XmlEncNamespaceUrl); 75XmlElement keySizeElement = document.CreateElement("KeySize", EncryptedXml.XmlEncNamespaceUrl); 90nsm.AddNamespace("enc", EncryptedXml.XmlEncNamespaceUrl); 93_algorithm = Utils.GetAttribute(encryptionMethodElement, "Algorithm", EncryptedXml.XmlEncNamespaceUrl);
System\Security\Cryptography\Xml\EncryptionProperty.cs (5)
26if (elementProperty.LocalName != "EncryptionProperty" || elementProperty.NamespaceURI != EncryptedXml.XmlEncNamespaceUrl) 51if (value.LocalName != "EncryptionProperty" || value.NamespaceURI != EncryptedXml.XmlEncNamespaceUrl) 89if (value.LocalName != "EncryptionProperty" || value.NamespaceURI != EncryptedXml.XmlEncNamespaceUrl) 94_id = Utils.GetAttribute(value, "Id", EncryptedXml.XmlEncNamespaceUrl); 95_target = Utils.GetAttribute(value, "Target", EncryptedXml.XmlEncNamespaceUrl);
System\Security\Cryptography\Xml\SignedXml.cs (2)
49private EncryptedXml? _exml; 182public EncryptedXml EncryptedXml
System\Security\Cryptography\Xml\XmlDecryptionTransform.cs (5)
22private EncryptedXml? _exml; // defines the XML encryption processing rules 50public EncryptedXml EncryptedXml 158_nsm.AddNamespace("enc", EncryptedXml.XmlEncNamespaceUrl); 172_nsm.AddNamespace("enc", EncryptedXml.XmlEncNamespaceUrl); 234encryptedDataElement.NamespaceURI == EncryptedXml.XmlEncNamespaceUrl)
System\Security\Cryptography\Xml\XmlLicenseTransform.cs (1)
139_namespaceManager.AddNamespace("enc", EncryptedXml.XmlEncNamespaceUrl);