Made jamessan's code agree with his comment (and the maximum integer that can fit into two bytes).

This commit is contained in:
Jeremy Fincher 2008-08-12 06:37:51 +00:00 committed by James Vega
parent 699bb15f23
commit bec12b6877

View File

@ -113,7 +113,7 @@ class Unix(callbacks.Plugin):
def makeSalt():
s = '\x00'
while self._cryptre.sub('', s) != '':
s = struct.pack('<h', random.randrange(-(2**15), 2**15))
s = struct.pack('<h', random.randrange(-(2**15), 2**15-1))
return s
if not salt:
salt = makeSalt()