From f73d0a11697e2be0a3a1819fdb91a5dadc4e6af8 Mon Sep 17 00:00:00 2001 From: Legrandin Date: Mon, 13 May 2013 07:56:15 +0200 Subject: FIX #1093446. Description of allow_wraparound was incorrect. In addition to fixing the problem, the patch also improves readibility of other sentences a little. Closes: https://bugs.launchpad.net/pycrypto/+bug/1093446 --- lib/Crypto/Util/Counter.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/Crypto/Util/Counter.py b/lib/Crypto/Util/Counter.py index 2068fb3..86382c8 100644 --- a/lib/Crypto/Util/Counter.py +++ b/lib/Crypto/Util/Counter.py @@ -73,7 +73,7 @@ def new(nbits, prefix=b(""), suffix=b(""), initial_value=1, overflow=0, little_e prefix || counter value || postfix - The counter value is incremented by one at each call. + The counter value is incremented by 1 at each call. :Parameters: nbits : integer @@ -87,12 +87,12 @@ def new(nbits, prefix=b(""), suffix=b(""), initial_value=1, overflow=0, little_e initial_value : integer The initial value of the counter. Default value is 1. little_endian : boolean - If True, the counter number will be encoded in little endian format. - If False (default), in big endian format. + If *True*, the counter number will be encoded in little endian format. + If *False* (default), in big endian format. allow_wraparound : boolean - If True, the function will raise an *OverflowError* exception as soon - as the counter wraps around. If False (default), the counter will - simply restart from zero. + If *True*, the counter will automatically restart from zero after + reaching the maximum value (``2**nbits-1``). + If *False* (default), the object will raise an *OverflowError*. disable_shortcut : deprecated This option is a no-op for backward compatibility. It will be removed in a future version. Don't use it. -- cgit v1.2.1