aboutsummaryrefslogtreecommitdiffstats
path: root/src/cryptography/hazmat/primitives/ciphers/modes.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2019-02-19 23:38:32 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2019-02-20 12:38:32 +0800
commitac1d13f43dea5ebee0506dc229cd431660916c73 (patch)
tree86b486dd681da2e15017546b4d84956215d56a76 /src/cryptography/hazmat/primitives/ciphers/modes.py
parent91e69f3b47aea16c4cbd0beb9a220b1bb760dfbe (diff)
downloadcryptography-ac1d13f43dea5ebee0506dc229cd431660916c73.tar.gz
cryptography-ac1d13f43dea5ebee0506dc229cd431660916c73.tar.bz2
cryptography-ac1d13f43dea5ebee0506dc229cd431660916c73.zip
Simplify string formatting (#4757)
Diffstat (limited to 'src/cryptography/hazmat/primitives/ciphers/modes.py')
-rw-r--r--src/cryptography/hazmat/primitives/ciphers/modes.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cryptography/hazmat/primitives/ciphers/modes.py b/src/cryptography/hazmat/primitives/ciphers/modes.py
index ad91a6e1..78fa1c48 100644
--- a/src/cryptography/hazmat/primitives/ciphers/modes.py
+++ b/src/cryptography/hazmat/primitives/ciphers/modes.py
@@ -72,7 +72,7 @@ def _check_aes_key_length(self, algorithm):
def _check_iv_length(self, algorithm):
if len(self.initialization_vector) * 8 != algorithm.block_size:
- raise ValueError("Invalid IV size ({0}) for {1}.".format(
+ raise ValueError("Invalid IV size ({}) for {}.".format(
len(self.initialization_vector), self.name
))
@@ -178,7 +178,7 @@ class CTR(object):
def validate_for_algorithm(self, algorithm):
_check_aes_key_length(self, algorithm)
if len(self.nonce) * 8 != algorithm.block_size:
- raise ValueError("Invalid nonce size ({0}) for {1}.".format(
+ raise ValueError("Invalid nonce size ({}) for {}.".format(
len(self.nonce), self.name
))
@@ -205,7 +205,7 @@ class GCM(object):
raise ValueError("min_tag_length must be >= 4")
if len(tag) < min_tag_length:
raise ValueError(
- "Authentication tag must be {0} bytes or longer.".format(
+ "Authentication tag must be {} bytes or longer.".format(
min_tag_length)
)
self._tag = tag