diff options
author | Legrandin <gooksankoo@hoiptorrow.mailexpire.com> | 2012-06-10 12:46:42 +0200 |
---|---|---|
committer | Legrandin <gooksankoo@hoiptorrow.mailexpire.com> | 2012-06-10 12:46:58 +0200 |
commit | e521e43d2f990f3f9c8e0cad9ab80b1e7e922894 (patch) | |
tree | 3316a3b694425c09dc5b20593153c661cccd1b92 /lib | |
parent | 125a4f93fa9c798520d08fce9f04c08e3566d98d (diff) | |
download | pycrypto-e521e43d2f990f3f9c8e0cad9ab80b1e7e922894.tar.gz |
Fixes to Counter module documentation
The example code contained special character '\x00' that is directly
shown by epydoc.
Counter module was not included in __init__ of Crypto.Util
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Crypto/Util/Counter.py | 5 | ||||
-rw-r--r-- | lib/Crypto/Util/__init__.py | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/Crypto/Util/Counter.py b/lib/Crypto/Util/Counter.py index 01b804a..d61b1a1 100644 --- a/lib/Crypto/Util/Counter.py +++ b/lib/Crypto/Util/Counter.py @@ -44,9 +44,10 @@ An example of usage is the following: >>> from Crypto.Cipher import AES >>> from Crypto.Util import Counter >>> - >>> pt = b'\x00'*1000000 + >>> pt = b'X'*1000000 >>> ctr = Counter.new(128) - >>> cipher = AES.new(b'\x00'*16, AES.MODE_CTR, counter=ctr) + >>> key = b'AES-128 symm. key' + >>> cipher = AES.new(key, AES.MODE_CTR, counter=ctr) >>> ct = cipher.encrypt(pt) :undocumented: __package__ diff --git a/lib/Crypto/Util/__init__.py b/lib/Crypto/Util/__init__.py index a3bef8a..18df5e0 100644 --- a/lib/Crypto/Util/__init__.py +++ b/lib/Crypto/Util/__init__.py @@ -24,6 +24,7 @@ Contains useful modules that don't belong into any of the other Crypto.* subpackages. Crypto.Util.number Number-theoretic functions (primality testing, etc.) +Crypto.Util.Counter Fast counter functions for CTR cipher modes. Crypto.Util.randpool Random number generation Crypto.Util.RFC1751 Converts between 128-bit keys and human-readable strings of words. @@ -31,7 +32,7 @@ Crypto.Util.asn1 Minimal support for ASN.1 DER encoding """ -__all__ = ['randpool', 'RFC1751', 'number', 'strxor', 'asn1' ] +__all__ = ['randpool', 'RFC1751', 'number', 'strxor', 'asn1', 'Counter' ] __revision__ = "$Id$" |