We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f0b4423 commit d51954bCopy full SHA for d51954b
1 file changed
python/http_ece/tests/test_ece.py
@@ -231,6 +231,16 @@ def test_nonzero_padding(self):
231
)
232
eq_(ex.exception.message, "Bad padding")
233
234
+ def test_damage(self):
235
+ with assert_raises(ECEException) as ex:
236
+ ece.decrypt(
237
+ self.m_header + b'\xbb\xc6\xb1\x1dF:~\x0f\x07+\xbe\xaaD\xe0\xd6.K\xe5\xf9]%\xe3\x86q\xe0}',
238
+ version='aes128gcm',
239
+ key=b'd\xc7\x0ed\xa7%U\x14Q\xf2\x08\xdf\xba\xa0\xb9r',
240
+ keyid=b64e(os.urandom(192)), # 256 bytes
241
+ )
242
+ eq_(ex.exception.message, "Decryption error: InvalidTag()")
243
+
244
245
class TestEceIntegration(unittest.TestCase):
246
@@ -455,7 +465,6 @@ def _run(self, mode):
455
465
outp = 'input'
456
466
457
467
for data in self.legacy_data:
458
- print(repr(data))
459
468
p = data['params'][mode]
460
469
if 'keys' in data:
461
470
key = None
0 commit comments