Merged silc_1_0_branch to trunk.
[crypto.git] / lib / silcmath / silcmath.h
index 6970b6528f636d6767cf7d74cbec0b7effe6f0b0..e1bb9945aaaa5e5334653f470258727204d14a0a 100644 (file)
@@ -2,16 +2,13 @@
 
   silcmath.h
  
-  COPYRIGHT
+  Author: Pekka Riikonen <priikone@silcnet.org>
  
-  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
-  Copyright (C) 1997 - 2000 Pekka Riikonen
+  Copyright (C) 1997 - 2001 Pekka Riikonen
  
   This program 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 of the License, or
-  (at your option) any later version.
+  the Free Software Foundation; version 2 of the License.
  
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,7 +17,7 @@
 
 */
 
-/****h* silcmath/silcmath.h
+/****h* silcmath/SILC Math Interface
  *
  * DESCRIPTION
  *
 #ifndef SILCMATH_H
 #define SILCMATH_H
 
+#include "silcrng.h"
+
 /****f* silcmath/SilcMathAPI/silc_math_gen_prime
  *
  * SYNOPSIS
  *
- *    int silc_math_gen_prime(SilcMPInt *prime, uint32 bits, bool verbose);
+ *    int silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits, bool verbose,
+ *                            SilcRng);
  *
  * DESCRIPTION
  *
  *    (r.joosten@pijnenburg.nl) for such a good help with prime tests. 
  *
  *    If argument verbose is TRUE this will display some status information
- *    about the progress of generation.
+ *    about the progress of generation.  If the `rng' is NULL then global
+ *    RNG is used, if non-NULL then `rng' is used to generate the random
+ *    number number.
  *
  ***/
-bool silc_math_gen_prime(SilcMPInt *prime, uint32 bits, bool verbose);
+bool silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits, bool verbose,
+                        SilcRng rng);
 
 /****f* silcmath/SilcMathAPI/silc_math_prime_test
  *