diff options
Diffstat (limited to 'cryptography/primitives/block/base.py')
-rw-r--r-- | cryptography/primitives/block/base.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cryptography/primitives/block/base.py b/cryptography/primitives/block/base.py index 2a6a5c37..207c83d9 100644 --- a/cryptography/primitives/block/base.py +++ b/cryptography/primitives/block/base.py @@ -23,6 +23,12 @@ class BlockCipher(object): self._ctx = api.create_block_cipher_context(cipher, mode) self._operation = None + @property + def name(self): + return "{0}-{1}-{2}".format( + self.cipher.name, self.cipher.key_size, self.mode.name, + ) + def encrypt(self, plaintext): if self._ctx is None: raise ValueError("BlockCipher was already finalized") |