GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 2, or (at your
+ by the Free Software Foundation; either version 3, or (at your
option) any later version.
GNUnet is distributed in the hope that it will be useful, but
struct GNUNET_CRYPTO_AesSessionKey skey;
struct GNUNET_CRYPTO_AesInitializationVector iv;
- GNUNET_CRYPTO_hash_create_random (&h1);
- GNUNET_CRYPTO_hash_create_random (&h2);
+ GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, &h1);
+ GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, &h2);
if (GNUNET_CRYPTO_hash_distance_u32 (&h1, &h2) !=
GNUNET_CRYPTO_hash_distance_u32 (&h2, &h1))
return 1;
if (1 != GNUNET_CRYPTO_hash_get_bit (&d, 6))
return 1;
memset (&d, 0, sizeof (d));
- GNUNET_CRYPTO_hash_to_AES_key (&d, &skey, &iv);
+ GNUNET_CRYPTO_hash_to_aes_key (&d, &skey, &iv);
if ((0 != memcmp (&skey, &zskey, sizeof (skey) - sizeof (unsigned int))) ||
(0 != memcmp (&iv, &ziv, sizeof (iv))))
return 1;
static void
file_hasher (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
- GNUNET_CRYPTO_hash_file (tc->sched,
- GNUNET_SCHEDULER_PRIORITY_DEFAULT,
- GNUNET_NO, FILENAME, 1024, &finished_task, cls);
+ GNUNET_assert (NULL !=
+ GNUNET_CRYPTO_hash_file (GNUNET_SCHEDULER_PRIORITY_DEFAULT,
+ FILENAME, 1024,
+ &finished_task, cls));
}