/* -*-c-*-
*
- * $Id: dsarand.c,v 1.2 2000/06/17 10:54:00 mdw Exp $
+ * $Id: dsarand.c,v 1.3 2001/02/03 16:08:56 mdw Exp $
*
* Random number generator for DSA
*
/*----- Revision history --------------------------------------------------*
*
* $Log: dsarand.c,v $
+ * Revision 1.3 2001/02/03 16:08:56 mdw
+ * Give generic random objects separate namespaces for their supported misc
+ * ops. Add operations for reading the current seed value.
+ *
* Revision 1.2 2000/06/17 10:54:00 mdw
* Typesetting fixes. Arena support.
*
case GRAND_SEEDBLOCK:
case GRAND_SEEDRAND:
case DSARAND_PASSES:
+ case DSARAND_SEEDSZ:
+ case DSARAND_GETSEED:
rc = 1;
break;
default:
case DSARAND_PASSES:
g->d.passes = va_arg(ap, unsigned);
break;
+ case DSARAND_SEEDSZ:
+ rc = g->d.sz;
+ break;
+ case DSARAND_GETSEED:
+ memcpy(va_arg(ap, void *), g->d.p, g->d.sz);
+ break;
default:
GRAND_BADOP;
break;