10 references to XmlConstants
Microsoft.AspNetCore.DataProtection (7)
AuthenticatedEncryption\ConfigurationModel\XmlExtensions.cs (2)
17
return ((bool?)element.Attribute(
XmlConstants
.RequiresEncryptionAttributeName)).GetValueOrDefault();
28
element.SetAttributeValue(
XmlConstants
.RequiresEncryptionAttributeName, true);
XmlEncryption\XmlEncryptionExtensions.cs (5)
39
var elementWhichRequiresDecryption = doc.Descendants(
XmlConstants
.EncryptedSecretElementName).FirstOrDefault();
50
string decryptorTypeName = (string)clonedElementWhichRequiresDecryption.Attribute(
XmlConstants
.DecryptorTypeAttributeName)!;
150
new XElement(
XmlConstants
.EncryptedSecretElementName,
151
new XAttribute(
XmlConstants
.DecryptorTypeAttributeName, entry.Value.DecryptorType.AssemblyQualifiedName!),
204
return element.DescendantsAndSelf(
XmlConstants
.EncryptedSecretElementName).Any();
Microsoft.AspNetCore.DataProtection.Tests (3)
XmlEncryption\XmlEncryptionExtensionsTests.cs (3)
179
.Returns<XElement>(el => new XElement(el.Name.LocalName + "_decrypted", new XElement(
XmlConstants
.EncryptedSecretElementName, "nested")));
224
Assert.Equal(
XmlConstants
.EncryptedSecretElementName, retVal.Name);
225
Assert.Equal(typeof(MyXmlDecryptor).AssemblyQualifiedName, (string)retVal.Attribute(
XmlConstants
.DecryptorTypeAttributeName));