Pycrypto Random.new()抛出有关参数数量的错误

时间:2016-08-23 08:34:13

标签: python

通过制作这些说明我的程序会崩溃原因吗?

>>> from Crypto import Random
>>> Random.new().read(16)
>>>


  File "/usr/local/lib/python2.7/dist-packages/Crypto/Random/_UserFriendlyRNG.py", line 215, in _get_singleton
    _singleton = _LockingUserFriendlyRNG()
  File "/usr/local/lib/python2.7/dist-packages/Crypto/Random/_UserFriendlyRNG.py", line 159, in __init__
    _UserFriendlyRNG.__init__(self)
  File "/usr/local/lib/python2.7/dist-packages/Crypto/Random/_UserFriendlyRNG.py", line 85, in __init__
    self._fa = FortunaAccumulator.FortunaAccumulator()
  File "/usr/local/lib/python2.7/dist-packages/Crypto/Random/Fortuna/FortunaAccumulator.py", line 119, in __init__
    self.generator = FortunaGenerator.AESGenerator()
  File "/usr/local/lib/python2.7/dist-packages/Crypto/Random/Fortuna/FortunaGenerator.py", line 66, in __init__
    self.counter = Counter.new(nbits=self.block_size*8, initial_value=0, little_endian=True)
  File "/usr/local/lib/python2.7/dist-packages/Crypto/Util/Counter.py", line 112, in new
    return _counter._newLE(bstr(prefix), bstr(suffix), initval, allow_wraparound=allow_wraparound, disable_shortcut=disable_shortcut)
TypeError: function takes at most 4 arguments (5 given)

0 个答案:

没有答案