X-Git-Url: http://git.silc.fi/gitweb/?a=blobdiff_plain;f=lib%2Fsilcmath%2Fsilcmath.h;h=79554f53a16fd3d7073c8a8e334badeecbd6fa8e;hb=87f7fe2aac95581dbd3e6258b6276da08952c13d;hp=64510b1dfc72227409f90c641bdc41dd081cbcce;hpb=3391c18da03cb4f2ba77372702ec67e82e418cdc;p=crypto.git diff --git a/lib/silcmath/silcmath.h b/lib/silcmath/silcmath.h index 64510b1d..79554f53 100644 --- a/lib/silcmath/silcmath.h +++ b/lib/silcmath/silcmath.h @@ -1,16 +1,15 @@ /* silcmath.h - + Author: Pekka Riikonen - - Copyright (C) 1997 - 2001 Pekka Riikonen - + + Copyright (C) 1997 - 2008 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 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -18,7 +17,7 @@ */ -/****h* silcmath/SILC Math Interface +/****h* silcmath/Math Interface * * DESCRIPTION * @@ -33,19 +32,18 @@ #include "silcrng.h" -/****f* silcmath/SilcMathAPI/silc_math_gen_prime +/****f* silcmath/silc_math_gen_prime * * SYNOPSIS * - * int silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits, bool verbose, - * SilcRng); + * SilcBool silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits, + * SilcBool verbose, SilcRng rng); * * DESCRIPTION * - * Find appropriate prime. It generates a number by taking random bytes. - * It then tests the number that it's not divisible by any of the small - * primes and then it performs Fermat's prime test. I thank Rieks Joosten - * (r.joosten@pijnenburg.nl) for such a good help with prime tests. + * Find appropriate prime. It generates a number by taking random bytes. + * It then tests the number that it's not divisible by any of the small + * primes and then it performs Fermat's prime test. * * If argument verbose is TRUE this will display some status information * about the progress of generation. If the `rng' is NULL then global @@ -53,10 +51,10 @@ * number number. * ***/ -bool silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits, bool verbose, - SilcRng rng); +SilcBool silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits, + SilcBool verbose, SilcRng rng); -/****f* silcmath/SilcMathAPI/silc_math_prime_test +/****f* silcmath/silc_math_prime_test * * SYNOPSIS * @@ -64,10 +62,10 @@ bool silc_math_gen_prime(SilcMPInt *prime, SilcUInt32 bits, bool verbose, * * DESCRIPTION * - * Performs primality testings for given number. Returns TRUE if the + * Performs primality testings for given number. Returns TRUE if the * number is probably a prime. * ***/ -bool silc_math_prime_test(SilcMPInt *p); +SilcBool silc_math_prime_test(SilcMPInt *p); #endif