5 implementations of IAuthenticatedEncryptorDescriptor
KeyManagementSimulator (1)
Program.cs (1)
232sealed class MockAuthenticatedEncryptorDescriptor : IAuthenticatedEncryptorDescriptor
Microsoft.AspNetCore.DataProtection (4)
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorDescriptor.cs (1)
14public sealed class AuthenticatedEncryptorDescriptor : IAuthenticatedEncryptorDescriptor
AuthenticatedEncryption\ConfigurationModel\CngCbcAuthenticatedEncryptorDescriptor.cs (1)
16public sealed class CngCbcAuthenticatedEncryptorDescriptor : IAuthenticatedEncryptorDescriptor
AuthenticatedEncryption\ConfigurationModel\CngGcmAuthenticatedEncryptorDescriptor.cs (1)
16public sealed class CngGcmAuthenticatedEncryptorDescriptor : IAuthenticatedEncryptorDescriptor
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptor.cs (1)
15public sealed class ManagedAuthenticatedEncryptorDescriptor : IAuthenticatedEncryptorDescriptor
96 references to IAuthenticatedEncryptorDescriptor
KeyManagementSimulator (3)
Program.cs (3)
241XmlSerializedDescriptorInfo IAuthenticatedEncryptorDescriptor.ExportToXml() => 250public override IAuthenticatedEncryptorDescriptor CreateNewDescriptor() => descriptor; 259IAuthenticatedEncryptorDescriptor IAuthenticatedEncryptorDescriptorDeserializer.ImportFromXml(XElement element) => descriptor;
Microsoft.AspNetCore.DataProtection (44)
AuthenticatedEncryption\ConfigurationModel\AlgorithmConfiguration.cs (4)
7/// A factory for producing <see cref="IAuthenticatedEncryptorDescriptor"/>. 14/// Creates a new <see cref="IAuthenticatedEncryptorDescriptor"/> instance based on this 18/// <returns>A unique <see cref="IAuthenticatedEncryptorDescriptor"/>.</returns> 19public abstract IAuthenticatedEncryptorDescriptor CreateNewDescriptor();
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorConfiguration.cs (2)
32public override IAuthenticatedEncryptorDescriptor CreateNewDescriptor() 38IAuthenticatedEncryptorDescriptor IInternalAlgorithmConfiguration.CreateDescriptorFromSecret(ISecret secret)
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorDescriptorDeserializer.cs (1)
21public IAuthenticatedEncryptorDescriptor ImportFromXml(XElement element)
AuthenticatedEncryption\ConfigurationModel\CngCbcAuthenticatedEncryptorConfiguration.cs (2)
77public override IAuthenticatedEncryptorDescriptor CreateNewDescriptor() 83IAuthenticatedEncryptorDescriptor IInternalAlgorithmConfiguration.CreateDescriptorFromSecret(ISecret secret)
AuthenticatedEncryption\ConfigurationModel\CngCbcAuthenticatedEncryptorDescriptorDeserializer.cs (1)
22public IAuthenticatedEncryptorDescriptor ImportFromXml(XElement element)
AuthenticatedEncryption\ConfigurationModel\CngGcmAuthenticatedEncryptorConfiguration.cs (2)
53public override IAuthenticatedEncryptorDescriptor CreateNewDescriptor() 59IAuthenticatedEncryptorDescriptor IInternalAlgorithmConfiguration.CreateDescriptorFromSecret(ISecret secret)
AuthenticatedEncryption\ConfigurationModel\CngGcmAuthenticatedEncryptorDescriptorDeserializer.cs (1)
22public IAuthenticatedEncryptorDescriptor ImportFromXml(XElement element)
AuthenticatedEncryption\ConfigurationModel\IAuthenticatedEncryptorDescriptorDeserializer.cs (3)
10/// The basic interface for deserializing an XML element into an <see cref="IAuthenticatedEncryptorDescriptor"/>. 18/// <returns>The <see cref="IAuthenticatedEncryptorDescriptor"/> represented by <paramref name="element"/>.</returns> 19IAuthenticatedEncryptorDescriptor ImportFromXml(XElement element);
AuthenticatedEncryption\ConfigurationModel\IInternalAlgorithmConfiguration.cs (3)
7/// A type that knows how to create instances of an <see cref="IAuthenticatedEncryptorDescriptor"/> 17/// Creates a new <see cref="IAuthenticatedEncryptorDescriptor"/> instance from this configuration 20IAuthenticatedEncryptorDescriptor CreateDescriptorFromSecret(ISecret secret);
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorConfiguration.cs (2)
56public override IAuthenticatedEncryptorDescriptor CreateNewDescriptor() 62IAuthenticatedEncryptorDescriptor IInternalAlgorithmConfiguration.CreateDescriptorFromSecret(ISecret secret)
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptorDeserializer.cs (1)
21public IAuthenticatedEncryptorDescriptor ImportFromXml(XElement element)
AuthenticatedEncryption\ConfigurationModel\XmlExtensions.cs (1)
22/// to storage. Use when implementing <see cref="IAuthenticatedEncryptorDescriptor.ExportToXml"/>.
AuthenticatedEncryption\ConfigurationModel\XmlSerializedDescriptorInfo.cs (3)
12/// <see cref="IAuthenticatedEncryptorDescriptor"/> along with the type that can be used 20/// <param name="serializedDescriptorElement">The XML-serialized form of the <see cref="IAuthenticatedEncryptorDescriptor"/>.</param> 46/// An XML-serialized representation of an <see cref="IAuthenticatedEncryptorDescriptor"/>.
KeyManagement\IKey.cs (2)
49/// Gets the <see cref="IAuthenticatedEncryptorDescriptor"/> instance associated with this key. 51IAuthenticatedEncryptorDescriptor Descriptor { get; }
KeyManagement\Internal\IInternalXmlKeyManager.cs (1)
27IAuthenticatedEncryptorDescriptor DeserializeDescriptorFromKeyElement(XElement keyElement);
KeyManagement\Key.cs (10)
20private IAuthenticatedEncryptorDescriptor? _descriptor; 24private readonly Func<IAuthenticatedEncryptorDescriptor>? _descriptorFactory; // May not be used 32/// The basic implementation of <see cref="IKey"/>, where the <see cref="IAuthenticatedEncryptorDescriptor"/> 40IAuthenticatedEncryptorDescriptor descriptor, 83Func<IAuthenticatedEncryptorDescriptor>? descriptorFactory) 101IAuthenticatedEncryptorDescriptor? descriptor, 102Func<IAuthenticatedEncryptorDescriptor>? descriptorFactory, 126public IAuthenticatedEncryptorDescriptor Descriptor 223private static Func<IAuthenticatedEncryptorDescriptor> GetLazyDescriptorDelegate(IInternalXmlKeyManager keyManager, XElement keyElement) 240IAuthenticatedEncryptorDescriptor GetLazyDescriptorDelegate()
KeyManagement\KeyManagementOptions.cs (1)
142/// the <see cref="IAuthenticatedEncryptorDescriptor"/> instance.
KeyManagement\XmlKeyManager.cs (4)
518?? CryptoUtil.Fail<IAuthenticatedEncryptorDescriptor>("CreateNewDescriptor returned null."); 571IAuthenticatedEncryptorDescriptor IInternalXmlKeyManager.DeserializeDescriptorFromKeyElement(XElement keyElement) 583var descriptorInstance = deserializerInstance.ImportFromXml(unencryptedInputToDeserializer); 585return descriptorInstance ?? CryptoUtil.Fail<IAuthenticatedEncryptorDescriptor>("ImportFromXml returned null.");
Microsoft.AspNetCore.DataProtection.Tests (49)
AuthenticatedEncryption\CngCbcAuthenticatedEncryptorFactoryTest.cs (2)
21key.Setup(k => k.Descriptor).Returns(new Mock<IAuthenticatedEncryptorDescriptor>().Object); 37var descriptor = new CngCbcAuthenticatedEncryptorConfiguration().CreateNewDescriptor();
AuthenticatedEncryption\CngGcmAuthenticatedEncryptorFactoryTest.cs (2)
21key.Setup(k => k.Descriptor).Returns(new Mock<IAuthenticatedEncryptorDescriptor>().Object); 37var descriptor = new CngGcmAuthenticatedEncryptorConfiguration().CreateNewDescriptor();
AuthenticatedEncryption\ConfigurationModel\AuthenticatedEncryptorDescriptorDeserializerTests.cs (1)
33var deserializedDescriptor = new AuthenticatedEncryptorDescriptorDeserializer().ImportFromXml(XElement.Parse(xml));
AuthenticatedEncryption\ConfigurationModel\CngCbcAuthenticatedEncryptorDescriptorDeserializerTests.cs (1)
40var deserializedDescriptor = new CngCbcAuthenticatedEncryptorDescriptorDeserializer().ImportFromXml(XElement.Parse(xml));
AuthenticatedEncryption\ConfigurationModel\CngGcmAuthenticatedEncryptorDescriptorDeserializerTests.cs (1)
37var deserializedDescriptor = new CngGcmAuthenticatedEncryptorDescriptorDeserializer().ImportFromXml(XElement.Parse(xml));
AuthenticatedEncryption\ConfigurationModel\ManagedAuthenticatedEncryptorDescriptorDeserializerTests.cs (3)
41var deserializedDescriptor = new ManagedAuthenticatedEncryptorDescriptorDeserializer().ImportFromXml(XElement.Parse(xml)); 75var deserializedDescriptor = new ManagedAuthenticatedEncryptorDescriptorDeserializer().ImportFromXml(XElement.Parse(xml)); 102var deserializedDescriptor = new ManagedAuthenticatedEncryptorDescriptorDeserializer().ImportFromXml(XElement.Parse(xml));
AuthenticatedEncryption\ManagedAuthenticatedEncryptorFactoryTest.cs (2)
19key.Setup(k => k.Descriptor).Returns(new Mock<IAuthenticatedEncryptorDescriptor>().Object); 34var descriptor = new ManagedAuthenticatedEncryptorConfiguration().CreateNewDescriptor();
KeyManagement\DefaultKeyResolverTests.cs (2)
340var mockDescriptor = new Mock<IAuthenticatedEncryptorDescriptor>(); 410var mockDescriptor = new Mock<IAuthenticatedEncryptorDescriptor>();
KeyManagement\DeferredKeyTests.cs (2)
23var mockDescriptor = Mock.Of<IAuthenticatedEncryptorDescriptor>();
KeyManagement\KeyRingBasedDataProtectorTests.cs (9)
202var mockDescriptor = new Mock<IAuthenticatedEncryptorDescriptor>(); 255var mockDescriptor = new Mock<IAuthenticatedEncryptorDescriptor>(); 286var mockDescriptor = new Mock<IAuthenticatedEncryptorDescriptor>(); 322var mockDescriptor = new Mock<IAuthenticatedEncryptorDescriptor>(); 389var mockDescriptor = new Mock<IAuthenticatedEncryptorDescriptor>(); 430var mockDescriptor = new Mock<IAuthenticatedEncryptorDescriptor>(); 477var mockDescriptor = new Mock<IAuthenticatedEncryptorDescriptor>(); 526var mockDescriptor = new Mock<IAuthenticatedEncryptorDescriptor>(); 530Key defaultKey = new Key(defaultKeyId, DateTimeOffset.Now, DateTimeOffset.Now, DateTimeOffset.Now, new Mock<IAuthenticatedEncryptorDescriptor>().Object, new[] { mockEncryptorFactory.Object });
KeyManagement\KeyRingProviderTests.cs (1)
943mockKey.Setup(o => o.Descriptor).Returns(new Mock<IAuthenticatedEncryptorDescriptor>().Object);
KeyManagement\KeyRingTests.cs (1)
114public IAuthenticatedEncryptorDescriptor Descriptor => throw new NotImplementedException();
KeyManagement\KeyTests.cs (3)
20var descriptor = Mock.Of<IAuthenticatedEncryptorDescriptor>(); 40var key = new Key(Guid.Empty, now, now, now, new Mock<IAuthenticatedEncryptorDescriptor>().Object, new[] { encryptorFactory });
KeyManagement\XmlKeyManagerTests.cs (18)
87var mockDescriptor = new Mock<IAuthenticatedEncryptorDescriptor>(); 89var expectedDescriptor = mockDescriptor.Object; 176var mockDescriptor = new Mock<IAuthenticatedEncryptorDescriptor>(); 178var expectedDescriptor = mockDescriptor.Object; 361var descriptorA = new Mock<IAuthenticatedEncryptorDescriptor>().Object; 362var descriptorB = new Mock<IAuthenticatedEncryptorDescriptor>().Object; 442mockActivator.ReturnDescriptorGivenDeserializerTypeNameAndInput("theDeserializer", "<node />", new Mock<IAuthenticatedEncryptorDescriptor>().Object); 477var expectedDescriptor = new Mock<IAuthenticatedEncryptorDescriptor>().Object; 517var expectedDescriptor = new Mock<IAuthenticatedEncryptorDescriptor>().Object; 753var descriptor = new Mock<IAuthenticatedEncryptorDescriptor>(MockBehavior.Strict); 851.Returns(new Mock<IAuthenticatedEncryptorDescriptor>(MockBehavior.Strict).Object); 1024public IAuthenticatedEncryptorDescriptor ImportFromXml(XElement element) 1032private IAuthenticatedEncryptorDescriptor _associatedDescriptor; 1035public TestEncryptorFactory(IAuthenticatedEncryptorDescriptor associatedDescriptor = null, IAuthenticatedEncryptor expectedEncryptor = null)
MockExtensions.cs (1)
18public static void ReturnDescriptorGivenDeserializerTypeNameAndInput(this Mock<IActivator> mockActivator, string typeName, string xml, IAuthenticatedEncryptorDescriptor descriptor)