for (i = 0; i < 1024; i++)
GNUNET_break (1024 > (buf[i] = GNUNET_CRYPTO_random_u32 (mode, 1024)));
for (i = 0; i < 10; i++)
- {
- b2 = GNUNET_CRYPTO_random_permute (mode, 1024);
- if (0 == memcmp (b2, buf, sizeof (buf)))
{
- fprintf (stderr, "!");
+ b2 = GNUNET_CRYPTO_random_permute (mode, 1024);
+ if (0 == memcmp (b2, buf, sizeof (buf)))
+ {
+ fprintf (stderr, "!");
+ GNUNET_free (b2);
+ continue;
+ }
GNUNET_free (b2);
- continue;
+ break;
}
- GNUNET_free (b2);
- break;
- }
if (i == 10)
- return 1; /* virtually impossible... */
+ return 1; /* virtually impossible... */
for (n = 10; n < 1024LL * 1024LL * 1024LL; n *= 10)
GNUNET_break (n > GNUNET_CRYPTO_random_u64 (mode, n));