[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r32497 - gnunet/src/util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r32497 - gnunet/src/util |
Date: |
Tue, 4 Mar 2014 12:25:17 +0100 |
Author: grothoff
Date: 2014-03-04 12:25:16 +0100 (Tue, 04 Mar 2014)
New Revision: 32497
Modified:
gnunet/src/util/crypto_random.c
Log:
-doxygen
Modified: gnunet/src/util/crypto_random.c
===================================================================
--- gnunet/src/util/crypto_random.c 2014-03-03 20:50:30 UTC (rev 32496)
+++ gnunet/src/util/crypto_random.c 2014-03-04 11:25:16 UTC (rev 32497)
@@ -1,5 +1,5 @@
/*
- This file is part of GNUnet. (C) 2001-2013 Christian Grothoff
+ This file is part of GNUnet. (C) 2001-2014 Christian Grothoff
(and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
@@ -84,7 +84,7 @@
/**
- * Seed a weak random generator. Only GNUNET_CRYPTO_QUALITY_WEAK-mode generator
+ * Seed a weak random generator. Only #GNUNET_CRYPTO_QUALITY_WEAK-mode
generator
* can be seeded.
*
* @param seed the seed to use
@@ -138,14 +138,15 @@
/**
- * Produce a random value.
+ * Produce a random unsigned 32-bit number modulo @a i.
*
* @param mode desired quality of the random number
* @param i the upper limit (exclusive) for the random number
* @return a random value in the interval [0,i[.
*/
uint32_t
-GNUNET_CRYPTO_random_u32 (enum GNUNET_CRYPTO_Quality mode, uint32_t i)
+GNUNET_CRYPTO_random_u32 (enum GNUNET_CRYPTO_Quality mode,
+ uint32_t i)
{
#ifdef gcry_fast_random_poll
static unsigned int invokeCount;
@@ -194,13 +195,14 @@
/**
* Get an array with a random permutation of the
* numbers 0...n-1.
- * @param mode GNUNET_RANDOM_QUALITY_STRONG if the strong (but expensive)
- * PRNG should be used, GNUNET_RANDOM_QUALITY_WEAK otherwise
+ * @param mode #GNUNET_RANDOM_QUALITY_STRONG if the strong (but expensive)
+ * PRNG should be used, #GNUNET_RANDOM_QUALITY_WEAK otherwise
* @param n the size of the array
* @return the permutation array (allocated from heap)
*/
unsigned int *
-GNUNET_CRYPTO_random_permute (enum GNUNET_CRYPTO_Quality mode, unsigned int n)
+GNUNET_CRYPTO_random_permute (enum GNUNET_CRYPTO_Quality mode,
+ unsigned int n)
{
unsigned int *ret;
unsigned int i;
@@ -223,9 +225,8 @@
/**
- * Random on unsigned 64-bit values.
+ * Generate random unsigned 64-bit value.
*
- *
* @param mode desired quality of the random number
* @param max value returned will be in range [0,max) (exclusive)
* @return random 64-bit number
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r32497 - gnunet/src/util,
gnunet <=