struct stat sbuf;
GNUNET_log_setup ("test-container-bloomfilter", "WARNING", NULL);
- SRANDOM (1);
+ GNUNET_CRYPTO_seed_weak_random (1);
if (0 == stat (TESTFILE, &sbuf))
if (0 != UNLINK (TESTFILE))
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "unlink", TESTFILE);
nextHC (&tmp);
GNUNET_CONTAINER_bloomfilter_add (bf, &tmp);
}
- SRANDOM (1);
+ GNUNET_CRYPTO_seed_weak_random (1);
ok1 = 0;
for (i = 0; i < 200; i++)
{
bfi = GNUNET_CONTAINER_bloomfilter_init (buf, SIZE, K);
GNUNET_assert (bfi != NULL);
- SRANDOM (1);
+ GNUNET_CRYPTO_seed_weak_random (1);
ok1 = 0;
ok2 = 0;
for (i = 0; i < 200; i++)
return -1;
}
- SRANDOM (1);
+ GNUNET_CRYPTO_seed_weak_random (1);
for (i = 0; i < 100; i++)
{
nextHC (&tmp);
GNUNET_CONTAINER_bloomfilter_remove (bfi, &tmp);
}
- SRANDOM (1);
+ GNUNET_CRYPTO_seed_weak_random (1);
ok1 = 0;
ok2 = 0;
return -1;
}
- SRANDOM (3);
+ GNUNET_CRYPTO_seed_weak_random (3);
GNUNET_CONTAINER_bloomfilter_clear (bf);
falseok = 0;
return -1;
}
- SRANDOM (2);
+ GNUNET_CRYPTO_seed_weak_random (2);
i = 20;
GNUNET_CONTAINER_bloomfilter_resize (bfi, &add_iterator, &i, SIZE * 2, K);
- SRANDOM (2);
+ GNUNET_CRYPTO_seed_weak_random (2);
i = 20;
GNUNET_CONTAINER_bloomfilter_resize (bf, &add_iterator, &i, SIZE * 2, K);
- SRANDOM (2);
+ GNUNET_CRYPTO_seed_weak_random (2);
ok1 = 0;
ok2 = 0;