2 implementations of IKeyRing
Microsoft.AspNetCore.DataProtection (2)
EphemeralDataProtectionProvider.cs (1)
75
private sealed class EphemeralKeyRing<T> :
IKeyRing
, IKeyRingProvider
KeyManagement\KeyRing.cs (1)
15
internal sealed class KeyRing :
IKeyRing
58 references to IKeyRing
Microsoft.AspNetCore.DataProtection (16)
EphemeralDataProtectionProvider.cs (1)
93
public
IKeyRing
GetCurrentKeyRing()
Internal\DataProtectionHostedService.cs (1)
35
var
keyRing = _keyRingProvider.GetCurrentKeyRing();
KeyManagement\Internal\CacheableKeyRing.cs (2)
23
internal CacheableKeyRing(CancellationToken expirationToken, DateTimeOffset expirationTime,
IKeyRing
keyRing)
32
internal
IKeyRing
KeyRing { get; }
KeyManagement\Internal\IKeyRingProvider.cs (1)
18
IKeyRing
GetCurrentKeyRing();
KeyManagement\KeyRing.cs (1)
13
/// A basic implementation of <see cref="
IKeyRing
"/>.
KeyManagement\KeyRingBasedDataProtector.cs (2)
96
var
currentKeyRing = _keyRingProvider.GetCurrentKeyRing();
228
var
currentKeyRing = _keyRingProvider.GetCurrentKeyRing();
KeyManagement\KeyRingProvider.cs (8)
203
public
IKeyRing
GetCurrentKeyRing()
208
internal
IKeyRing
RefreshCurrentKeyRing()
213
internal
IKeyRing
GetCurrentKeyRingCore(DateTime utcNow, bool forceRefresh = false)
225
private
IKeyRing
GetCurrentKeyRingCoreOld(DateTime utcNow, bool forceRefresh)
325
private
IKeyRing
GetCurrentKeyRingCoreNew(DateTime utcNow, bool forceRefresh)
386
var
taskKeyRing = GetKeyRingFromCompletedTaskUnsynchronized(existingTask, utcNow); // Throws if the task failed
418
var
newKeyRing = GetKeyRingFromCompletedTaskUnsynchronized(existingTask, utcNow); // Throws if the task failed (winning thread only)
444
private
IKeyRing
? GetKeyRingFromCompletedTaskUnsynchronized(Task<CacheableKeyRing> task, DateTime utcNow)
Microsoft.AspNetCore.DataProtection.Tests (42)
HostingTests.cs (2)
25
.Returns(Mock.Of<
IKeyRing
>())
52
.Returns(Mock.Of<
IKeyRing
>())
KeyManagement\CacheableKeyRingTests.cs (6)
21
var
keyRing = new Mock<
IKeyRing
>().Object;
36
var
keyRing = new Mock<
IKeyRing
>().Object;
50
var
keyRing = new Mock<
IKeyRing
>().Object;
KeyManagement\KeyRingBasedDataProtectorTests.cs (3)
53
var mockKeyRing = new Mock<
IKeyRing
>(MockBehavior.Strict);
91
var mockKeyRing = new Mock<
IKeyRing
>(MockBehavior.Strict);
602
var mockKeyRing = new Mock<
IKeyRing
>(MockBehavior.Strict);
KeyManagement\KeyRingProviderTests.cs (31)
577
var
expectedKeyRing = new Mock<
IKeyRing
>().Object;
589
var
retVal1 = keyRingProvider.GetCurrentKeyRingCore(now);
590
var
retVal2 = keyRingProvider.GetCurrentKeyRingCore(now + TimeSpan.FromHours(1));
603
var
expectedKeyRing1 = new Mock<
IKeyRing
>().Object;
604
var
expectedKeyRing2 = new Mock<
IKeyRing
>().Object;
628
var
retVal1 = keyRingProvider.GetCurrentKeyRingCore(now);
629
var
retVal2 = keyRingProvider.GetCurrentKeyRingCore(now + TimeSpan.FromMinutes(1));
630
var
retVal3 = keyRingProvider.GetCurrentKeyRingCore(now + TimeSpan.FromMinutes(2), forceRefresh: true);
644
var
expectedKeyRing1 = new Mock<
IKeyRing
>().Object;
645
var
expectedKeyRing2 = new Mock<
IKeyRing
>().Object;
663
var
retVal1 = keyRingProvider.GetCurrentKeyRingCore(now);
664
var
retVal2 = keyRingProvider.GetCurrentKeyRingCore(now + TimeSpan.FromHours(1), forceRefresh: true);
677
var
expectedKeyRing = new Mock<
IKeyRing
>().Object;
711
var
foregroundRetVal = keyRingProvider.GetCurrentKeyRingCore(now);
729
var
originalKeyRing = new Mock<
IKeyRing
>().Object;
735
var
updatedKeyRing = new Mock<
IKeyRing
>().Object;
816
var
expectedKeyRing1 = new Mock<
IKeyRing
>().Object;
817
var
expectedKeyRing2 = new Mock<
IKeyRing
>().Object;
841
var tasks = new Task<
IKeyRing
>[taskCount];
846
var
keyRing = keyRingProvider.GetCurrentKeyRingCore(time2);
867
var
updatedKeyRing = keyRingProvider.GetCurrentKeyRingCore(time2);