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)
160var preferredDefaultKey = (from key in allKeys
212public DefaultKeyResolution ResolveDefaultKeyPolicy(DateTimeOffset now, IEnumerable<IKey> allKeys)
215var defaultKey = FindDefaultKey(now, allKeys, out retVal.FallbackKey);