summaryrefslogtreecommitdiff
path: root/random
diff options
context:
space:
mode:
Diffstat (limited to 'random')
-rw-r--r--random/random-glib.c10
-rw-r--r--random/random-glib.h3
2 files changed, 13 insertions, 0 deletions
diff --git a/random/random-glib.c b/random/random-glib.c
index ccbb3a5..314fc17 100644
--- a/random/random-glib.c
+++ b/random/random-glib.c
@@ -41,3 +41,13 @@ nice_rng_glib_new (void)
return ret;
}
+NiceRNG *
+nice_rng_glib_new_predictable (void)
+{
+ NiceRNG *rng;
+
+ rng = nice_rng_glib_new ();
+ rng->seed (rng, 0);
+ return rng;
+}
+
diff --git a/random/random-glib.h b/random/random-glib.h
index 5387c05..c6bf995 100644
--- a/random/random-glib.h
+++ b/random/random-glib.h
@@ -11,6 +11,9 @@ G_BEGIN_DECLS
NiceRNG *
nice_rng_glib_new (void);
+NiceRNG *
+nice_rng_glib_new_predictable (void);
+
G_END_DECLS
#endif /* _RANDOM_GLIB_H */