summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLegrandin <helderijs@gmail.com>2013-05-13 07:56:15 +0200
committerDwayne Litzenberger <dlitz@dlitz.net>2013-07-14 23:08:47 -0700
commitf73d0a11697e2be0a3a1819fdb91a5dadc4e6af8 (patch)
treeb2b20789531b033a650ab6c9b920d521db920e3b
parent74bd74f490f4eadbfa9a3d750645b21e46679317 (diff)
downloadpycrypto-f73d0a11697e2be0a3a1819fdb91a5dadc4e6af8.tar.gz
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
-rw-r--r--lib/Crypto/Util/Counter.py12
1 files changed, 6 insertions, 6 deletions
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.