public void FillBitCacheTest() { var aesCounter = new AesCounter(20130116, 19680201); UtilityFunctions.CallMethod(aesCounter, "FillBitCache"); var currentCache = UtilityFunctions.GetField <uint[]>(aesCounter, "_bitCache"); var cacheCopy = new uint[currentCache.Length]; currentCache.CopyTo(cacheCopy, 0); UtilityFunctions.CallMethod(aesCounter, "FillBitCache"); for (int i = 0; i < currentCache.Length; i++) { Assert.AreNotEqual(cacheCopy[i], currentCache[i]); } }
public void FillFloatCacheTest() { var pseudoDes = new PseudoDes(20130116, 19680201); UtilityFunctions.CallMethod(pseudoDes, "FillFloatCache"); var currentCache = UtilityFunctions.GetField <float[]>(pseudoDes, "_floatCache"); var cacheCopy = new float[currentCache.Length]; currentCache.CopyTo(cacheCopy, 0); UtilityFunctions.CallMethod(pseudoDes, "FillFloatCache"); for (int i = 0; i < currentCache.Length; i++) { Assert.AreNotEqual(cacheCopy[i], currentCache[i]); } }