Random number generator uses wrong API
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python-Crypto |
New
|
Undecided
|
Unassigned |
Bug Description
The code tries to access `time.clock()` which doesn't exist (in my Python distribution).
On Unix there is `time.clock_
I tested with Miniforge3 (CPython) and Miniconda3, simply installed via `conda install pycrypto`.
```
p = KeyPair()
File "d:\forks\
_.key = key = RSA.generate(
File "c:\programdata
obj = _RSA.generate_
File "c:\programdata
p = pubkey.
File "c:\programdata
X = getRandomRange (lower_bound, upper_bound, randfunc)
File "c:\programdata
value = getRandomIntege
File "c:\programdata
S = randfunc(N>>3)
File "c:\programdata
return self._singleton
File "c:\programdata
return _UserFriendlyRN
File "c:\programdata
File "c:\programdata
t = time.clock()
AttributeError: module 'time' has no attribute 'clock'
*******
```
description: | updated |
time.process_time() seems to be the intended replacement.