Peter Surda
27f5de0f9c
- not used yet, just an inactive helper function - I received feedback that OpenSSL.rand isn't more secure than os.urandom. I read several debates/analyses about it and concur
10 lines
172 B
Python
10 lines
172 B
Python
import os
|
|
|
|
from pyelliptic.openssl import OpenSSL
|
|
|
|
def randomBytes(n):
|
|
try:
|
|
return os.urandom(n)
|
|
except NotImplementedError:
|
|
return OpenSSL.rand(n)
|