aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cryptography/exceptions.py2
-rw-r--r--cryptography/hazmat/primitives/ciphers/base.py6
-rw-r--r--tests/hazmat/primitives/utils.py4
3 files changed, 6 insertions, 6 deletions
diff --git a/cryptography/exceptions.py b/cryptography/exceptions.py
index f2a731f0..8b286679 100644
--- a/cryptography/exceptions.py
+++ b/cryptography/exceptions.py
@@ -20,5 +20,5 @@ class AlreadyFinalized(Exception):
pass
-class NotFinalized(Exception):
+class NotYetFinalized(Exception):
pass
diff --git a/cryptography/hazmat/primitives/ciphers/base.py b/cryptography/hazmat/primitives/ciphers/base.py
index 5a4e7850..3a27030a 100644
--- a/cryptography/hazmat/primitives/ciphers/base.py
+++ b/cryptography/hazmat/primitives/ciphers/base.py
@@ -14,7 +14,7 @@
from __future__ import absolute_import, division, print_function
from cryptography import utils
-from cryptography.exceptions import AlreadyFinalized, NotFinalized
+from cryptography.exceptions import AlreadyFinalized, NotYetFinalized
from cryptography.hazmat.primitives import interfaces
@@ -87,6 +87,6 @@ class _AEADCipherContext(_CipherContext):
@property
def tag(self):
if self._ctx is not None:
- raise NotFinalized("You must finalize encryption before "
- "getting the tag")
+ raise NotYetFinalized("You must finalize encryption before "
+ "getting the tag")
return self._tag
diff --git a/tests/hazmat/primitives/utils.py b/tests/hazmat/primitives/utils.py
index 839ff822..98455556 100644
--- a/tests/hazmat/primitives/utils.py
+++ b/tests/hazmat/primitives/utils.py
@@ -7,7 +7,7 @@ from cryptography.hazmat.bindings import _ALL_BACKENDS
from cryptography.hazmat.primitives import hashes, hmac
from cryptography.hazmat.primitives.ciphers import Cipher
from cryptography.exceptions import (
- AlreadyFinalized, NotFinalized,
+ AlreadyFinalized, NotYetFinalized,
)
from ...utils import load_vectors_from_file
@@ -333,7 +333,7 @@ def aead_use_after_finalize_test(backend, cipher_factory, mode_factory,
)
encryptor = cipher.encryptor()
encryptor.update(b"a" * 16)
- with pytest.raises(NotFinalized):
+ with pytest.raises(NotYetFinalized):
encryptor.tag
encryptor.finalize()
with pytest.raises(AlreadyFinalized):