aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2013-10-17 19:08:20 -0700
committerDonald Stufft <donald@stufft.io>2013-10-17 19:08:20 -0700
commitf17b34485456a56305a871d7f1b9f48796704fc7 (patch)
treec9b681d832f1537c70da93542b204fa4f5ac9a34
parent7c1610af3e782380e74544637596d5bd2677321c (diff)
parent3bdc6b61f64b8049284834681a2b1a43d057999f (diff)
downloadcryptography-f17b34485456a56305a871d7f1b9f48796704fc7.tar.gz
cryptography-f17b34485456a56305a871d7f1b9f48796704fc7.tar.bz2
cryptography-f17b34485456a56305a871d7f1b9f48796704fc7.zip
Merge pull request #113 from alex/remove-name
Removed name fro BlockCipher -- it's arbitrarily based on the format ope...
-rw-r--r--cryptography/primitives/block/base.py6
-rw-r--r--tests/primitives/test_block.py11
2 files changed, 1 insertions, 16 deletions
diff --git a/cryptography/primitives/block/base.py b/cryptography/primitives/block/base.py
index b84ca9c4..50e9e9e5 100644
--- a/cryptography/primitives/block/base.py
+++ b/cryptography/primitives/block/base.py
@@ -36,12 +36,6 @@ 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")
diff --git a/tests/primitives/test_block.py b/tests/primitives/test_block.py
index 774885fa..f4d3f467 100644
--- a/tests/primitives/test_block.py
+++ b/tests/primitives/test_block.py
@@ -23,20 +23,11 @@ from cryptography.primitives.block.base import _Operation
class TestBlockCipher(object):
- def test_cipher_name(self, api):
- cipher = BlockCipher(
- ciphers.AES(binascii.unhexlify(b"0" * 32)),
- modes.CBC(binascii.unhexlify(b"0" * 32)),
- api
- )
- assert cipher.name == "AES-128-CBC"
-
def test_instantiate_without_api(self):
- cipher = BlockCipher(
+ BlockCipher(
ciphers.AES(binascii.unhexlify(b"0" * 32)),
modes.CBC(binascii.unhexlify(b"0" * 32))
)
- assert cipher.name == "AES-128-CBC"
def test_use_after_finalize(self, api):
cipher = BlockCipher(