summaryrefslogtreecommitdiff
path: root/lib/Crypto/Cipher
diff options
context:
space:
mode:
authorLegrandin <helderijs@gmail.com>2013-08-04 22:46:06 +0200
committerDwayne Litzenberger <dlitz@dlitz.net>2013-10-20 13:30:21 -0700
commit8766da37a2612ebcea13c7451a2157d175f29a41 (patch)
tree1b7571a13e04473efde5975916527134832d84e7 /lib/Crypto/Cipher
parentd044a478332682c253c379db87d444b056e4ab37 (diff)
downloadpycrypto-8766da37a2612ebcea13c7451a2157d175f29a41.tar.gz
whitespace changes (pre-AEAD)
[dlitz@dlitz.net: Whitespace changes extracted from the author's pull request:] - [9c13f9c] Rename 'IV' parameter to 'nonce' for AEAD modes. - [4ec64d8] Removed last references to ApiUsageError - [ee46922] Removed most 'import *' statements
Diffstat (limited to 'lib/Crypto/Cipher')
-rw-r--r--lib/Crypto/Cipher/ARC2.py4
-rw-r--r--lib/Crypto/Cipher/Blowfish.py2
-rw-r--r--lib/Crypto/Cipher/CAST.py2
-rw-r--r--lib/Crypto/Cipher/DES.py2
-rw-r--r--lib/Crypto/Cipher/DES3.py2
-rw-r--r--lib/Crypto/Cipher/blockalgo.py13
6 files changed, 13 insertions, 12 deletions
diff --git a/lib/Crypto/Cipher/ARC2.py b/lib/Crypto/Cipher/ARC2.py
index ddcca47..1b62be1 100644
--- a/lib/Crypto/Cipher/ARC2.py
+++ b/lib/Crypto/Cipher/ARC2.py
@@ -32,7 +32,7 @@ The company eventually published its full specification in RFC2268_.
RC2 has a fixed data block size of 8 bytes. Length of its keys can vary from
8 to 128 bits. One particular property of RC2 is that the actual
-cryptographic strength of the key (*effective key length*) can be reduced
+cryptographic strength of the key (*effective key length*) can be reduced
via a parameter.
Even though RC2 is not cryptographically broken, it has not been analyzed as
@@ -66,7 +66,7 @@ class RC2Cipher (blockalgo.BlockAlgo):
def __init__(self, key, *args, **kwargs):
"""Initialize an ARC2 cipher object
-
+
See also `new()` at the module level."""
blockalgo.BlockAlgo.__init__(self, _ARC2, key, *args, **kwargs)
diff --git a/lib/Crypto/Cipher/Blowfish.py b/lib/Crypto/Cipher/Blowfish.py
index 2ce78e9..5c3128d 100644
--- a/lib/Crypto/Cipher/Blowfish.py
+++ b/lib/Crypto/Cipher/Blowfish.py
@@ -60,7 +60,7 @@ class BlowfishCipher (blockalgo.BlockAlgo):
def __init__(self, key, *args, **kwargs):
"""Initialize a Blowfish cipher object
-
+
See also `new()` at the module level."""
blockalgo.BlockAlgo.__init__(self, _Blowfish, key, *args, **kwargs)
diff --git a/lib/Crypto/Cipher/CAST.py b/lib/Crypto/Cipher/CAST.py
index 5f009a7..88f8cac 100644
--- a/lib/Crypto/Cipher/CAST.py
+++ b/lib/Crypto/Cipher/CAST.py
@@ -63,7 +63,7 @@ class CAST128Cipher(blockalgo.BlockAlgo):
def __init__(self, key, *args, **kwargs):
"""Initialize a CAST-128 cipher object
-
+
See also `new()` at the module level."""
blockalgo.BlockAlgo.__init__(self, _CAST, key, *args, **kwargs)
diff --git a/lib/Crypto/Cipher/DES.py b/lib/Crypto/Cipher/DES.py
index 1062d23..2ae63bc 100644
--- a/lib/Crypto/Cipher/DES.py
+++ b/lib/Crypto/Cipher/DES.py
@@ -58,7 +58,7 @@ class DESCipher(blockalgo.BlockAlgo):
def __init__(self, key, *args, **kwargs):
"""Initialize a DES cipher object
-
+
See also `new()` at the module level."""
blockalgo.BlockAlgo.__init__(self, _DES, key, *args, **kwargs)
diff --git a/lib/Crypto/Cipher/DES3.py b/lib/Crypto/Cipher/DES3.py
index 0265c0c..7d20e5f 100644
--- a/lib/Crypto/Cipher/DES3.py
+++ b/lib/Crypto/Cipher/DES3.py
@@ -71,7 +71,7 @@ class DES3Cipher(blockalgo.BlockAlgo):
def __init__(self, key, *args, **kwargs):
"""Initialize a TDES cipher object
-
+
See also `new()` at the module level."""
blockalgo.BlockAlgo.__init__(self, _DES3, key, *args, **kwargs)
diff --git a/lib/Crypto/Cipher/blockalgo.py b/lib/Crypto/Cipher/blockalgo.py
index 218a367..89410f5 100644
--- a/lib/Crypto/Cipher/blockalgo.py
+++ b/lib/Crypto/Cipher/blockalgo.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# Cipher/blockalgo.py
+# Cipher/blockalgo.py
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
@@ -100,7 +100,7 @@ MODE_OFB = 5
#: to the *IV* for the other modes) and increment its lowest **m** bits by
#: one (modulo *2^m*) for each block. In most cases, **m** is chosen to be half
#: the block size.
-#:
+#:
#: Reusing the same *initial counter block* for encryptions done with the same
#: key lead to catastrophic cryptograhic failures.
#:
@@ -201,7 +201,7 @@ class BlockAlgo:
or decrypting other data with the same key.
This function does not add any padding to the plaintext.
-
+
- For `MODE_ECB` and `MODE_CBC`, *plaintext* length (in bytes) must be
a multiple of *block_size*.
@@ -245,11 +245,12 @@ class BlockAlgo:
def decrypt(self, ciphertext):
"""Decrypt data with the key and the parameters set at initialization.
-
+
The cipher object is stateful; decryption of a long block
of data can be broken up in two or more calls to `decrypt()`.
+
That is, the statement:
-
+
>>> c.decrypt(a) + c.decrypt(b)
is always equivalent to:
@@ -260,7 +261,7 @@ class BlockAlgo:
or decrypting other data with the same key.
This function does not remove any padding from the plaintext.
-
+
- For `MODE_ECB` and `MODE_CBC`, *ciphertext* length (in bytes) must
be a multiple of *block_size*.