From 7350fbb6583236b929235a8be7f17f149901f004 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Thu, 21 Mar 2019 17:16:21 +0100 Subject: [implem-python] Simplification de pad10* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dans le cadre d'une croisade contre les range(len(…)). Suppression d'un paramètre inutile dans la foulée. --- python/lilliput_ae_1.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/lilliput_ae_1.py') diff --git a/python/lilliput_ae_1.py b/python/lilliput_ae_1.py index 0bc4236..5cc263b 100644 --- a/python/lilliput_ae_1.py +++ b/python/lilliput_ae_1.py @@ -85,7 +85,7 @@ def TreatMessageEnc(M, N, key): Final = ltbc.LilliputTBCEnc(tweak, key, checksum) else: - m_padded = Padding10LSB(M[l], padding_bytes*8) + m_padded = Padding10LSB(M[l]) checksum = XorState(checksum, m_padded) tweak = TweakMessage(N, l, _MessageTweak.PAD) pad = ltbc.LilliputTBCEnc(tweak, key, [0 for byte in range(0, BLOCK_BYTES)]) @@ -122,7 +122,7 @@ def TreatMessageDec(C, N, key): lower_part = LowPart(pad, padding_bytes*8) M.append(XorState(C[l], lower_part)) - m_padded = Padding10LSB(M[l], padding_bytes*8) + m_padded = Padding10LSB(M[l]) checksum = XorState(checksum, m_padded) tweak_final = TweakMessage(N, l+1, _MessageTweak.FINAL) Final = ltbc.LilliputTBCEnc(tweak_final, key, checksum) -- cgit v1.2.3