+/* --- @rand_seed@ --- *
+ *
+ * Arguments: @rand_pool *r@ = pointer to a randomness pool
+ * @unsigned bits@ = number of bits to ensure
+ *
+ * Returns: ---
+ *
+ * Use: Ensures that there are at least @bits@ good bits of entropy
+ * in the pool. It is recommended that you call this after
+ * initializing a new pool. Requesting @bits > RAND_IBITS@ is
+ * doomed to failure (and is an error).
+ */
+
+void rand_seed(rand_pool *r, unsigned bits)
+{
+ RAND_RESOLVE(r);
+
+ assert(((void)"bits pointlessly large in rand_seed", bits <= RAND_IBITS));
+ assert(((void)"no noise source in rand_seed", r->s));
+
+ while (r->ibits < bits)
+ r->s->getnoise(r);
+ rand_gate(r);
+}
+