6 implementations of IKeyEscrowSink
Microsoft.AspNetCore.DataProtection (2)
KeyManagement\KeyEscrowServiceProviderExtensions.cs (1)
24
private sealed class AggregateKeyEscrowSink :
IKeyEscrowSink
KeyManagement\XmlKeyManager.cs (1)
721
private sealed class AggregateKeyEscrowSink :
IKeyEscrowSink
Microsoft.AspNetCore.DataProtection.Tests (4)
Internal\KeyManagementOptionsSetupTest.cs (2)
134
private class MyKeyEscrowSink1 :
IKeyEscrowSink
142
private class MyKeyEscrowSink2 :
IKeyEscrowSink
RegistryPolicyResolverTests.cs (2)
306
private class MyKeyEscrowSink1 :
IKeyEscrowSink
314
private class MyKeyEscrowSink2 :
IKeyEscrowSink
39 references to IKeyEscrowSink
Microsoft.AspNetCore.DataProtection (32)
DataProtectionBuilderExtensions.cs (10)
53
/// Registers a <see cref="
IKeyEscrowSink
"/> to perform escrow before keys are persisted to storage.
56
/// <param name="sink">The instance of the <see cref="
IKeyEscrowSink
"/> to register.</param>
61
public static IDataProtectionBuilder AddKeyEscrowSink(this IDataProtectionBuilder builder,
IKeyEscrowSink
sink)
75
/// Registers a <see cref="
IKeyEscrowSink
"/> to perform escrow before keys are persisted to storage.
77
/// <typeparam name="TImplementation">The concrete type of the <see cref="
IKeyEscrowSink
"/> to register.</typeparam>
84
where TImplementation : class,
IKeyEscrowSink
101
/// Registers a <see cref="
IKeyEscrowSink
"/> to perform escrow before keys are persisted to storage.
104
/// <param name="factory">A factory that creates the <see cref="
IKeyEscrowSink
"/> instance.</param>
109
public static IDataProtectionBuilder AddKeyEscrowSink(this IDataProtectionBuilder builder, Func<IServiceProvider,
IKeyEscrowSink
> factory)
116
var
instance = factory(services);
Internal\KeyManagementOptionsSetup.cs (1)
60
foreach (
var
escrowSink in escrowSinks)
KeyManagement\IKeyEscrowSink.cs (2)
14
/// <see cref="
IKeyEscrowSink
"/> is distinct from <see cref="IXmlRepository"/> in that
15
/// <see cref="
IKeyEscrowSink
"/> provides a write-only interface and instances handle unencrypted key material,
KeyManagement\KeyEscrowServiceProviderExtensions.cs (6)
15
/// Gets an aggregate <see cref="
IKeyEscrowSink
"/> from the underlying <see cref="IServiceProvider"/>.
18
public static
IKeyEscrowSink
? GetKeyEscrowSink(this IServiceProvider services)
20
var escrowSinks = services?.GetService<IEnumerable<
IKeyEscrowSink
>>()?.ToList();
26
private readonly List<
IKeyEscrowSink
> _sinks;
28
public AggregateKeyEscrowSink(List<
IKeyEscrowSink
> sinks)
35
foreach (
var
sink in _sinks)
KeyManagement\KeyManagementOptions.cs (3)
147
/// The list of <see cref="
IKeyEscrowSink
"/> to store the key material in.
149
public IList<
IKeyEscrowSink
> KeyEscrowSinks { get; } = new List<
IKeyEscrowSink
>();
KeyManagement\XmlKeyManager.cs (4)
55
private readonly
IKeyEscrowSink
? _keyEscrowSink;
723
private readonly IList<
IKeyEscrowSink
> _sinks;
725
public AggregateKeyEscrowSink(IList<
IKeyEscrowSink
> sinks)
732
foreach (
var
sink in _sinks)
RegistryPolicy.cs (2)
14
IEnumerable<
IKeyEscrowSink
> keyEscrowSinks,
24
public IEnumerable<
IKeyEscrowSink
> KeyEscrowSinks { get; }
RegistryPolicyResolver.cs (4)
54
typeof(
IKeyEscrowSink
).AssertIsAssignableFrom(TypeExtensions.GetTypeWithTrimFriendlyErrorMessage(candidate));
104
Array.Empty<
IKeyEscrowSink
>() :
105
new
IKeyEscrowSink
[escrowSinks.Count];
108
keyEscrowSinks[i] = _activator.CreateInstance<
IKeyEscrowSink
>(escrowSinks[i]);
Microsoft.AspNetCore.DataProtection.Tests (7)
KeyManagement\KeyEscrowServiceProviderExtensionsTests.cs (6)
35
var mockKeyEscrowSink = new Mock<
IKeyEscrowSink
>();
43
serviceCollection.AddSingleton<
IKeyEscrowSink
>(mockKeyEscrowSink.Object);
60
var mockKeyEscrowSink1 = new Mock<
IKeyEscrowSink
>();
67
var mockKeyEscrowSink2 = new Mock<
IKeyEscrowSink
>();
75
serviceCollection.AddSingleton<
IKeyEscrowSink
>(mockKeyEscrowSink1.Object);
76
serviceCollection.AddSingleton<
IKeyEscrowSink
>(mockKeyEscrowSink2.Object);
KeyManagement\XmlKeyManagerTests.cs (1)
190
var mockKeyEscrow = new Mock<
IKeyEscrowSink
>();