diff options
-rw-r--r-- | cryptography/hazmat/primitives/ciphers/algorithms.py | 10 |
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) |