diff options
Diffstat (limited to 'lib/Crypto/Cipher/blockalgo.py')
-rw-r--r-- | lib/Crypto/Cipher/blockalgo.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Crypto/Cipher/blockalgo.py b/lib/Crypto/Cipher/blockalgo.py index ba8cfdc..98e0e00 100644 --- a/lib/Crypto/Cipher/blockalgo.py +++ b/lib/Crypto/Cipher/blockalgo.py @@ -526,7 +526,14 @@ class BlockAlgo: self._done_first_block = False self._done_last_block = False - self.IV = _getParameter('iv', 1, args, kwargs) + self.IV = _getParameter('IV', 1, args, kwargs) + if self.IV is None: + # TODO: Decide whether 'IV' or 'iv' should be used going forward, + # and deprecate the other. 'IV' is consistent with the rest of + # PyCrypto, but 'iv' is more common in Python generally. For now, + # we'll support both here. When in doubt, use a positional + # parameter for now. + self.IV = _getParameter('iv', 1, args, kwargs) if not self.IV: raise ValueError("MODE_OPENPGP requires an IV") |