Uprating of the passphrase pixie.
[u/mdw/catacomb] / rand.c
diff --git a/rand.c b/rand.c
index c3b777d..c50e10a 100644 (file)
--- a/rand.c
+++ b/rand.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: rand.c,v 1.5 2000/06/17 11:53:55 mdw Exp $
+ * $Id$
  *
  * Secure random number generator
  *
  * MA 02111-1307, USA.
  */
 
-/*----- Revision history --------------------------------------------------* 
- *
- * $Log: rand.c,v $
- * Revision 1.5  2000/06/17 11:53:55  mdw
- * Deprecate `rand_getgood'.  Provide a new interface to ensure that a pool
- * is well seeded.  Use secure arena for memory allocation.
- *
- * Revision 1.4  1999/12/13 15:34:28  mdw
- * Increase the entropy threshhold in rand_getgood.
- *
- * Revision 1.3  1999/12/10 23:28:07  mdw
- * Bug fix: rand_getgood didn't update buffer pointer.
- *
- * Revision 1.2  1999/10/12 21:00:15  mdw
- * Make pool and buffer sizes more sensible.
- *
- * Revision 1.1  1999/09/03 08:41:12  mdw
- * Initial import.
- *
- */
-
 /*----- Header files ------------------------------------------------------*/
 
 #include <stdarg.h>
@@ -485,6 +464,8 @@ static int gmisc(grand *r, unsigned op, ...)
        case RAND_KEY:
        case RAND_NOISESRC:
        case RAND_SEED:
+       case RAND_TIMER:
+       case RAND_GOODBITS:
          rc = 1;
          break;
        default:
@@ -528,6 +509,12 @@ static int gmisc(grand *r, unsigned op, ...)
     case RAND_SEED:
       rand_seed(&g->p, va_arg(ap, unsigned));
       break;
+    case RAND_TIMER:
+      TIMER(&g->p);
+      break;
+    case RAND_GOODBITS:
+      rc = rand_goodbits(&g->p);
+      break;
     default:
       GRAND_BADOP;
       break;