prime.h
上传用户:zbbssh
上传日期:2007-01-08
资源大小:196k
文件大小:0k
源码类别:

CA认证

开发平台:

C/C++

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