aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpgscm/lib.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gpgscm/lib.scm')
-rw-r--r--tests/gpgscm/lib.scm21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/gpgscm/lib.scm b/tests/gpgscm/lib.scm
index 316eacf87..270189dcd 100644
--- a/tests/gpgscm/lib.scm
+++ b/tests/gpgscm/lib.scm
@@ -185,3 +185,24 @@
(else
(write-char (apply read-char p) acc)
(loop acc))))))
+
+;;
+;; Libc functions.
+;;
+
+;; Get our process id.
+(ffi-define (getpid))
+
+;;
+;; Random numbers.
+;;
+
+;; Seed the random number generator.
+(ffi-define (srandom seed))
+
+;; Get a pseudo-random number between 0 (inclusive) and SCALE
+;; (exclusive).
+(ffi-define (random scale))
+
+;; Create a string of the given SIZE containing pseudo-random data.
+(ffi-define (make-random-string size))