home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / crypl200.zip / BNLIB / PRIME.H < prev    next >
C/C++ Source or Header  |  1996-05-16  |  467b  |  21 lines

  1. struct BigNum;
  2.  
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6.  
  7. /* Generate a prime >= bn. leaving the result in bn. */
  8. int primeGen(struct BigNum *bn, unsigned (*rand)(unsigned),
  9.     int (*f)(void *arg, int c), void *arg, unsigned exponent, ...);
  10.  
  11. /*
  12.  * Generate a prime of the form bn + k*step.  Step must be even and
  13.  * bn must be odd.
  14.  */
  15. int primeGenStrong(struct BigNum *bn, struct BigNum const *step,
  16.     int (*f)(void *arg, int c), void *arg);
  17.  
  18. #ifdef __cplusplus
  19. }
  20. #endif
  21.