summaryrefslogtreecommitdiffstats
path: root/botan/wrappers/boost-python/rng_test.py
diff options
context:
space:
mode:
authorEd Baak <ed.baak@nokia.com>2010-07-26 14:06:13 +1000
committerEd Baak <ed.baak@nokia.com>2010-07-26 14:06:13 +1000
commit02e9b6740ff7851b52ab677800e94fb77e6092ed (patch)
treea38a4f4d44b53a95b5db40e5ec12b513b5896e06 /botan/wrappers/boost-python/rng_test.py
parenteb2fbe409d1423c0b707b9986ee1e56fa19b355a (diff)
Included Botan and ssh code to make QtUItest compile again (as a separate package without creator). Note that this is a temporary hack and will go away when we moveQtUItest into creator.
Diffstat (limited to 'botan/wrappers/boost-python/rng_test.py')
-rw-r--r--botan/wrappers/boost-python/rng_test.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/botan/wrappers/boost-python/rng_test.py b/botan/wrappers/boost-python/rng_test.py
new file mode 100644
index 0000000..06c79b8
--- /dev/null
+++ b/botan/wrappers/boost-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")