KeyManagement\DefaultKeyResolver.cs (11)
93private bool CanCreateAuthenticatedEncryptor(IKey key, ref int retriesRemaining)
107nameof(IKey.CreateEncryptor),
108new InvalidOperationException($"{nameof(IKey.CreateEncryptor)} returned null."));
133_logger.KeyIsIneligibleToBeTheDefaultKeyBecauseItsMethodFailed(key.KeyId, nameof(IKey.CreateEncryptor), exceptions is null ? ex : new AggregateException(exceptions));
137_logger.RetryingMethodOfKeyAfterFailure(key.KeyId, nameof(IKey.CreateEncryptor), ex);
148private IKey? FindDefaultKey(DateTimeOffset now, IEnumerable<IKey> allKeys, out IKey? fallbackKey)
161var preferredDefaultKey = (from key in allKeys
214public DefaultKeyResolution ResolveDefaultKeyPolicy(DateTimeOffset now, IEnumerable<IKey> allKeys)
217var defaultKey = FindDefaultKey(now, allKeys, out retVal.FallbackKey);