diff --git a/src/helper_random.py b/src/helper_random.py new file mode 100644 index 00000000..a0fb08f1 --- /dev/null +++ b/src/helper_random.py @@ -0,0 +1,9 @@ +import os + +from pyelliptic.openssl import OpenSSL + +def randomBytes(n): + try: + return os.urandom(n) + except NotImplementedError: + return OpenSSL.rand(n)