diff options
| author | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2019-03-14 16:30:27 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2019-03-21 14:49:15 +0100 |
| commit | a7abd1a33ca68e2e2db59332b612db69ffb31496 (patch) | |
| tree | 4be62ec7b31c8ae636454e3c67c0fd41a747e453 | |
| parent | 417ac09668ea124245dbac0084608d9c396f5a76 (diff) | |
| download | lilliput-ae-implem-a7abd1a33ca68e2e2db59332b612db69ffb31496.tar.xz | |
[implem-python] Gestion de l'échec de déchiffrement dans genkat_aead
Ce serait mieux si l'API renvoyait une exception… Un jour.
| -rwxr-xr-x | python/genkat_aead.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/genkat_aead.py b/python/genkat_aead.py index 6d7ca51..5bce05f 100755 --- a/python/genkat_aead.py +++ b/python/genkat_aead.py @@ -28,8 +28,8 @@ class DecryptionError(Exception): def __str__(self): return '({s.mode} / {s.keylen}) Expected {exp}; got {act}'.format( s=self, - exp=bstr(self.expected), - act=bstr(self.actual) + exp=bstr(self.expected) if self.expected is not None else 'NONE', + act=bstr(self.actual) if self.actual is not None else 'NONE' ) |
