/// <summary> /// Test will timeout if secure random implementation always returns a /// constant value. /// </summary> /// <exception cref="System.Exception"/> public virtual void TestRandomLong() { OsSecureRandom random = GetOsSecureRandom(); long rand1 = random.NextLong(); long rand2 = random.NextLong(); while (rand1 == rand2) { rand2 = random.NextLong(); } random.Close(); }
/// <exception cref="System.Exception"/> public virtual void TestRefillReservoir() { OsSecureRandom random = GetOsSecureRandom(); for (int i = 0; i < 8196; i++) { random.NextLong(); } random.Close(); }