diff options
Diffstat (limited to 'src/util/test_crypto_hash.c')
-rw-r--r-- | src/util/test_crypto_hash.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/util/test_crypto_hash.c b/src/util/test_crypto_hash.c index bc0411482..a8ef39a38 100644 --- a/src/util/test_crypto_hash.c +++ b/src/util/test_crypto_hash.c | |||
@@ -35,18 +35,18 @@ static char block[65536]; | |||
35 | static int | 35 | static int |
36 | test (int number) | 36 | test (int number) |
37 | { | 37 | { |
38 | GNUNET_HashCode h1; | 38 | struct GNUNET_HashCode h1; |
39 | GNUNET_HashCode h2; | 39 | struct GNUNET_HashCode h2; |
40 | struct GNUNET_CRYPTO_HashAsciiEncoded enc; | 40 | struct GNUNET_CRYPTO_HashAsciiEncoded enc; |
41 | 41 | ||
42 | memset (&h1, number, sizeof (GNUNET_HashCode)); | 42 | memset (&h1, number, sizeof (struct GNUNET_HashCode)); |
43 | GNUNET_CRYPTO_hash_to_enc (&h1, &enc); | 43 | GNUNET_CRYPTO_hash_to_enc (&h1, &enc); |
44 | if (GNUNET_OK != GNUNET_CRYPTO_hash_from_string ((char *) &enc, &h2)) | 44 | if (GNUNET_OK != GNUNET_CRYPTO_hash_from_string ((char *) &enc, &h2)) |
45 | { | 45 | { |
46 | printf ("enc2hash failed!\n"); | 46 | printf ("enc2hash failed!\n"); |
47 | return 1; | 47 | return 1; |
48 | } | 48 | } |
49 | if (0 != memcmp (&h1, &h2, sizeof (GNUNET_HashCode))) | 49 | if (0 != memcmp (&h1, &h2, sizeof (struct GNUNET_HashCode))) |
50 | return 1; | 50 | return 1; |
51 | return 0; | 51 | return 0; |
52 | } | 52 | } |
@@ -67,10 +67,10 @@ testArithmetic () | |||
67 | { | 67 | { |
68 | static struct GNUNET_CRYPTO_AesSessionKey zskey; | 68 | static struct GNUNET_CRYPTO_AesSessionKey zskey; |
69 | static struct GNUNET_CRYPTO_AesInitializationVector ziv; | 69 | static struct GNUNET_CRYPTO_AesInitializationVector ziv; |
70 | GNUNET_HashCode h1; | 70 | struct GNUNET_HashCode h1; |
71 | GNUNET_HashCode h2; | 71 | struct GNUNET_HashCode h2; |
72 | GNUNET_HashCode d; | 72 | struct GNUNET_HashCode d; |
73 | GNUNET_HashCode s; | 73 | struct GNUNET_HashCode s; |
74 | struct GNUNET_CRYPTO_AesSessionKey skey; | 74 | struct GNUNET_CRYPTO_AesSessionKey skey; |
75 | struct GNUNET_CRYPTO_AesInitializationVector iv; | 75 | struct GNUNET_CRYPTO_AesInitializationVector iv; |
76 | 76 | ||
@@ -107,10 +107,10 @@ testArithmetic () | |||
107 | } | 107 | } |
108 | 108 | ||
109 | static void | 109 | static void |
110 | finished_task (void *cls, const GNUNET_HashCode * res) | 110 | finished_task (void *cls, const struct GNUNET_HashCode * res) |
111 | { | 111 | { |
112 | int *ret = cls; | 112 | int *ret = cls; |
113 | GNUNET_HashCode want; | 113 | struct GNUNET_HashCode want; |
114 | 114 | ||
115 | GNUNET_CRYPTO_hash (block, sizeof (block), &want); | 115 | GNUNET_CRYPTO_hash (block, sizeof (block), &want); |
116 | if (0 != memcmp (res, &want, sizeof (want))) | 116 | if (0 != memcmp (res, &want, sizeof (want))) |