Fix arguments to GNUNET_CRYPTO_hash call.
authorDavid Barksdale <amatus.amongus@gmail.com>
Mon, 17 May 2010 05:28:03 +0000 (05:28 +0000)
committerDavid Barksdale <amatus.amongus@gmail.com>
Mon, 17 May 2010 05:28:03 +0000 (05:28 +0000)
src/util/crypto_ksk.c

index 6c36d2f7b502e78c08a83a4e7cce2e4aa2e4c691..7f69c1dff38b48c4113b7b98f7eab743608b1040 100644 (file)
@@ -180,7 +180,7 @@ mpz_randomize (mpz_t n, unsigned int nbits, GNUNET_HashCode * rnd)
     {
       GNUNET_CRYPTO_hash (&tmp[i], sizeof (GNUNET_HashCode), &tmp[i + 1]);
     }
-  GNUNET_CRYPTO_hash (rnd, sizeof (GNUNET_HashCode), &tmp[i + 1]);
+  GNUNET_CRYPTO_hash (&tmp[i], sizeof (GNUNET_HashCode), rnd);
   mpz_import (n, cnt * sizeof (GNUNET_HashCode) / sizeof (unsigned int),
               1, sizeof (unsigned int), 1, 0, tmp);
   GNUNET_free (tmp);