20 writes to ShouldGenerateNewKey
Microsoft.AspNetCore.DataProtection (1)
KeyManagement\DefaultKeyResolver.cs (1)
219retVal.ShouldGenerateNewKey = defaultKey is null;
Microsoft.AspNetCore.DataProtection.Tests (19)
KeyManagement\KeyRingProviderTests.cs (19)
45ShouldGenerateNewKey = false 83ShouldGenerateNewKey = false 88ShouldGenerateNewKey = false 131ShouldGenerateNewKey = true 136ShouldGenerateNewKey = false 179ShouldGenerateNewKey = true 184ShouldGenerateNewKey = true 220ShouldGenerateNewKey = true 225ShouldGenerateNewKey = true 264ShouldGenerateNewKey = true 304ShouldGenerateNewKey = true 309ShouldGenerateNewKey = false 348ShouldGenerateNewKey = true 386ShouldGenerateNewKey = true 469ShouldGenerateNewKey = false // Let the key ring provider decide 482ShouldGenerateNewKey = !key2ValidWhenKey1Expires 499ShouldGenerateNewKey = false // Let the key ring provider decide 551ShouldGenerateNewKey = true, // Force re-generation 556ShouldGenerateNewKey = true, // Force re-generation
19 references to ShouldGenerateNewKey
Microsoft.AspNetCore.DataProtection (2)
KeyManagement\Internal\DefaultKeyResolution.cs (1)
23/// honor the <see cref="ShouldGenerateNewKey"/> property. This property may
KeyManagement\KeyRingProvider.cs (1)
105if (defaultKeyPolicy.ShouldGenerateNewKey || defaultKey == null)
Microsoft.AspNetCore.DataProtection.Tests (17)
KeyManagement\DefaultKeyResolverTests.cs (17)
31Assert.True(resolution.ShouldGenerateNewKey); 47Assert.False(resolution.ShouldGenerateNewKey); 63Assert.False(resolution.ShouldGenerateNewKey); 78Assert.False(resolution.ShouldGenerateNewKey); 93Assert.False(resolution.ShouldGenerateNewKey); // Does not reflect pending expiration 110Assert.False(resolution.ShouldGenerateNewKey); // Does not reflect pending expiration 126Assert.True(resolution.ShouldGenerateNewKey); 142Assert.True(resolution.ShouldGenerateNewKey); 157Assert.False(resolution.ShouldGenerateNewKey); 172Assert.True(resolution.ShouldGenerateNewKey); 189Assert.False(resolution.ShouldGenerateNewKey); 207Assert.True(resolution.ShouldGenerateNewKey); 225Assert.True(resolution.ShouldGenerateNewKey); 242Assert.True(resolution.ShouldGenerateNewKey); 278Assert.False(resolution.ShouldGenerateNewKey); 310Assert.True(resolution.ShouldGenerateNewKey); 389Assert.True(resolution.ShouldGenerateNewKey);