diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-11-04 14:00:32 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-11-04 14:00:32 +0000 |
commit | 83b19539f4d322b43683f5838b72e9ec2c8e6073 (patch) | |
tree | d0ab9329fcbefe360d9d14e2ace21a6b3396dfe9 /src/util/test_crypto_random.c | |
parent | 28a2eb43281a1f08a67954f07beb9af3a9bc9a35 (diff) | |
download | gnunet-83b19539f4d322b43683f5838b72e9ec2c8e6073.tar.gz gnunet-83b19539f4d322b43683f5838b72e9ec2c8e6073.zip |
curly wars / auto-indentation
Diffstat (limited to 'src/util/test_crypto_random.c')
-rw-r--r-- | src/util/test_crypto_random.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/util/test_crypto_random.c b/src/util/test_crypto_random.c index 3b86ececd..46d3ed0aa 100644 --- a/src/util/test_crypto_random.c +++ b/src/util/test_crypto_random.c | |||
@@ -39,19 +39,19 @@ test (enum GNUNET_CRYPTO_Quality mode) | |||
39 | for (i = 0; i < 1024; i++) | 39 | for (i = 0; i < 1024; i++) |
40 | GNUNET_break (1024 > (buf[i] = GNUNET_CRYPTO_random_u32 (mode, 1024))); | 40 | GNUNET_break (1024 > (buf[i] = GNUNET_CRYPTO_random_u32 (mode, 1024))); |
41 | for (i = 0; i < 10; i++) | 41 | for (i = 0; i < 10; i++) |
42 | { | ||
43 | b2 = GNUNET_CRYPTO_random_permute (mode, 1024); | ||
44 | if (0 == memcmp (b2, buf, sizeof (buf))) | ||
42 | { | 45 | { |
43 | b2 = GNUNET_CRYPTO_random_permute (mode, 1024); | 46 | fprintf (stderr, "!"); |
44 | if (0 == memcmp (b2, buf, sizeof (buf))) | ||
45 | { | ||
46 | fprintf (stderr, "!"); | ||
47 | GNUNET_free (b2); | ||
48 | continue; | ||
49 | } | ||
50 | GNUNET_free (b2); | 47 | GNUNET_free (b2); |
51 | break; | 48 | continue; |
52 | } | 49 | } |
50 | GNUNET_free (b2); | ||
51 | break; | ||
52 | } | ||
53 | if (i == 10) | 53 | if (i == 10) |
54 | return 1; /* virtually impossible... */ | 54 | return 1; /* virtually impossible... */ |
55 | 55 | ||
56 | for (n = 10; n < 1024LL * 1024LL * 1024LL; n *= 10) | 56 | for (n = 10; n < 1024LL * 1024LL * 1024LL; n *= 10) |
57 | GNUNET_break (n > GNUNET_CRYPTO_random_u64 (mode, n)); | 57 | GNUNET_break (n > GNUNET_CRYPTO_random_u64 (mode, n)); |