From a62f8baf340cdb977fdab8f29cfa71340c07c0e9 Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 9 Oct 2009 18:08:17 +0000 Subject: Move boost.python example scripts to doc/python --- doc/python/rng_test.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 doc/python/rng_test.py (limited to 'doc/python/rng_test.py') diff --git a/doc/python/rng_test.py b/doc/python/rng_test.py new file mode 100755 index 000000000..06c79b84e --- /dev/null +++ b/doc/python/rng_test.py @@ -0,0 +1,22 @@ +#!/usr/bin/python + +import botan + +rng = botan.RandomNumberGenerator() + +print "name", rng.name() + +rng.add_entropy("blah") + +print "random 16", rng.gen_random(16).encode("hex") +print "random 32", rng.gen_random(32).encode("base64"), + +rng.reseed() + +for i in range(0, 10): + print rng.gen_random_byte(), +print + +rng.add_entropy("blah") + +print "random 16", rng.gen_random(16).encode("hex") -- cgit v1.2.3