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