예제 #1
0
        public bool TryGetEntropy(IEntropyExtractor extractor, out byte[] entropy)
        {
            entropy = new byte[32];

            try
            {
                entropy = extractor.GetEntropicData().Invoke();
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
예제 #2
0
        public void Accumulator_ThrowsException_If_Passed_More_Than_MaxAmount_Of_Sources()
        {
            var extractors = new IEntropyExtractor[256];

            Assert.Throws(typeof(ArgumentException), () => new VenturaAccumulator(extractors.ToList()));
        }