diff options
| author | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2019-03-14 13:06:45 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2019-03-21 14:49:15 +0100 |
| commit | 504c32f4bd4d6e90864fec066de950a1b8925709 (patch) | |
| tree | 30332f3725f336c9e9c2f3c6a75c1d457a2f664e /python/lilliput.py | |
| parent | f161a41e1bb1b379335bb658877a8859a64c9d10 (diff) | |
| download | lilliput-ae-implem-504c32f4bd4d6e90864fec066de950a1b8925709.tar.xz | |
[implem-python] Ajout de NONCE_BYTES dans constants.py
Diffstat (limited to 'python/lilliput.py')
| -rw-r--r-- | python/lilliput.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/python/lilliput.py b/python/lilliput.py index f6679a8..e92ed5f 100644 --- a/python/lilliput.py +++ b/python/lilliput.py @@ -1,8 +1,6 @@ import lilliput_ae_1 import lilliput_ae_2 - - -N_BYTES = 15 +from constants import NONCE_BYTES def _checkInputs(key, nonce): @@ -11,7 +9,7 @@ def _checkInputs(key, nonce): if len(key)*8 not in valid_key_lengths: raise ValueError('invalid key size: {} not in {}'.format(len(key)*8, valid_key_lengths)) - if len(nonce) != N_BYTES: + if len(nonce) != NONCE_BYTES: raise ValueError('nonce must be {}-byte long'.format(N_BYTES)) |
