20 writes to ShouldGenerateNewKey
Microsoft.AspNetCore.DataProtection (1)
KeyManagement\DefaultKeyResolver.cs (1)
217retVal.ShouldGenerateNewKey = defaultKey is null;
Microsoft.AspNetCore.DataProtection.Tests (19)
KeyManagement\KeyRingProviderTests.cs (19)
39ShouldGenerateNewKey = false 77ShouldGenerateNewKey = false 82ShouldGenerateNewKey = false 125ShouldGenerateNewKey = true 130ShouldGenerateNewKey = false 173ShouldGenerateNewKey = true 178ShouldGenerateNewKey = true 214ShouldGenerateNewKey = true 219ShouldGenerateNewKey = true 258ShouldGenerateNewKey = true 298ShouldGenerateNewKey = true 303ShouldGenerateNewKey = false 342ShouldGenerateNewKey = true 380ShouldGenerateNewKey = true 463ShouldGenerateNewKey = false // Let the key ring provider decide 476ShouldGenerateNewKey = !key2ValidWhenKey1Expires 493ShouldGenerateNewKey = false // Let the key ring provider decide 545ShouldGenerateNewKey = true, // Force re-generation 550ShouldGenerateNewKey = 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)
27Assert.True(resolution.ShouldGenerateNewKey); 43Assert.False(resolution.ShouldGenerateNewKey); 59Assert.False(resolution.ShouldGenerateNewKey); 74Assert.False(resolution.ShouldGenerateNewKey); 89Assert.False(resolution.ShouldGenerateNewKey); // Does not reflect pending expiration 106Assert.False(resolution.ShouldGenerateNewKey); // Does not reflect pending expiration 122Assert.True(resolution.ShouldGenerateNewKey); 138Assert.True(resolution.ShouldGenerateNewKey); 153Assert.False(resolution.ShouldGenerateNewKey); 168Assert.True(resolution.ShouldGenerateNewKey); 185Assert.False(resolution.ShouldGenerateNewKey); 203Assert.True(resolution.ShouldGenerateNewKey); 221Assert.True(resolution.ShouldGenerateNewKey); 238Assert.True(resolution.ShouldGenerateNewKey); 274Assert.False(resolution.ShouldGenerateNewKey); 306Assert.True(resolution.ShouldGenerateNewKey); 385Assert.True(resolution.ShouldGenerateNewKey);