예제 #1
0
        internal bool AreAllKeysWithinInitializationDuration(IEnumerable <RsaKeyContainer> keys)
        {
            // the expired check will include retired keys
            keys = FilterExpiredKeys(keys);

            var result = keys
                         .All(x =>
            {
                var age   = _clock.GetAge(x.Created);
                var isNew = _options.IsWithinInitializationDuration(age);
                return(isNew);
            });

            return(result);
        }
예제 #2
0
        internal bool AreAllKeysWithinInitializationDuration(IEnumerable <KeyContainer> keys)
        {
            if (_options.InitializationDuration == TimeSpan.Zero)
            {
                return(false);
            }

            // the expired check will also filter retired keys
            keys = FilterExpiredKeys(keys);

            var result = keys.All(x =>
            {
                var age   = _clock.GetAge(x.Created);
                var isNew = _options.IsWithinInitializationDuration(age);
                return(isNew);
            });

            return(result);
        }