Generic interface.
[u/mdw/catacomb] / dsa.h
diff --git a/dsa.h b/dsa.h
index 1958d50..97f8241 100644 (file)
--- a/dsa.h
+++ b/dsa.h
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: dsa.h,v 1.1 1999/11/19 19:28:00 mdw Exp $
+ * $Id: dsa.h,v 1.2 1999/11/20 22:23:48 mdw Exp $
  *
  * Digital Signature Algorithm
  *
@@ -30,6 +30,9 @@
 /*----- Revision history --------------------------------------------------* 
  *
  * $Log: dsa.h,v $
+ * Revision 1.2  1999/11/20 22:23:48  mdw
+ * Allow event handler to abort the search process.
+ *
  * Revision 1.1  1999/11/19 19:28:00  mdw
  * Implementation of the Digital Signature Algorithm.
  *
@@ -110,9 +113,8 @@ typedef struct dsa_sig {
  * Arguments:  @dsa_param *dp@ = where to store parameters
  *             @unsigned l@ = bitlength of @p@ in bits
  *             @const void *k@ = pointer to key material
+ *             @int (*proc)(int ev, mp *m, void *p)@ = event procedure
  *             @size_t sz@ = size of key material
- *             @void (*proc)(int ev, mp *m, void *p)@ = event procedure
- *             @void *p@ = argument for event procedure
  *
  * Returns:    Zero if all went well, nonzero if key material was
  *             unsuitable (one of the @DSAEV@ codes).
@@ -126,12 +128,14 @@ typedef struct dsa_sig {
  *             The event procedure is informed of various happenings during
  *             generation.  It is passed an event code describing what
  *             happened, and a multiprecision number which pertains to the
- *             event code.
+ *             event code.  It may abort the search at any time by returning
+ *             a nonzero value, which is returned as the result of the
+ *             function.
  */
 
 extern int dsa_seed(dsa_param */*dp*/, unsigned /*l*/,
                    const void */*k*/, size_t /*sz*/,
-                   void (*proc)(int /*ev*/, mp */*m*/, void */*p*/),
+                   int (*proc)(int /*ev*/, mp */*m*/, void */*p*/),
                    void */*p*/);
 
 /* --- @dsa_mksig@ --- *