aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2013-11-06 15:20:23 +0800
committerPaul Kehrer <paul.l.kehrer@gmail.com>2013-11-06 15:20:23 +0800
commit4ec3f253a81a42e2804831c40f4ac28be4b56577 (patch)
treee72e74771b7bf94e6bb6171c6fd0b7396803a65b /cryptography
parent21dde56b48bf473932ce815860dd2ec99f2e2c75 (diff)
downloadcryptography-4ec3f253a81a42e2804831c40f4ac28be4b56577.tar.gz
cryptography-4ec3f253a81a42e2804831c40f4ac28be4b56577.tar.bz2
cryptography-4ec3f253a81a42e2804831c40f4ac28be4b56577.zip
rename cipher to algorithm within the Cipher object
Diffstat (limited to 'cryptography')
-rw-r--r--cryptography/hazmat/primitives/ciphers/algorithms.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/cryptography/hazmat/primitives/ciphers/algorithms.py b/cryptography/hazmat/primitives/ciphers/algorithms.py
index 0b11e466..56dca216 100644
--- a/cryptography/hazmat/primitives/ciphers/algorithms.py
+++ b/cryptography/hazmat/primitives/ciphers/algorithms.py
@@ -17,7 +17,7 @@ from cryptography.hazmat.primitives import interfaces
class Cipher(object):
- def __init__(self, cipher, mode, backend=None):
+ def __init__(self, algorithm, mode, backend=None):
super(Cipher, self).__init__()
if backend is None:
@@ -25,17 +25,19 @@ class Cipher(object):
_default_backend as backend,
)
- self.cipher = cipher
+ self.algorithm = algorithm
self.mode = mode
self._backend = backend
def encryptor(self):
return _CipherContext(
- self._backend.ciphers.create_encrypt_ctx(self.cipher, self.mode))
+ self._backend.ciphers.create_encrypt_ctx(self.algorithm,
+ self.mode))
def decryptor(self):
return _CipherContext(
- self._backend.ciphers.create_decrypt_ctx(self.cipher, self.mode))
+ self._backend.ciphers.create_decrypt_ctx(self.algorithm,
+ self.mode))
@interfaces.register(interfaces.CipherContext)