From 218318cbb9252ea291f9d37c80a8554ffa3dfd07 Mon Sep 17 00:00:00 2001 From: J08nY Date: Sat, 18 Oct 2025 21:24:08 +0200 Subject: Use nmults instead of type annotations in countermeasures. --- pyecsca/ec/countermeasures.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pyecsca/ec/countermeasures.py b/pyecsca/ec/countermeasures.py index 5e940e2..e7c1a5a 100644 --- a/pyecsca/ec/countermeasures.py +++ b/pyecsca/ec/countermeasures.py @@ -76,12 +76,7 @@ class ScalarMultiplierCountermeasure(ABC): :param mult: The scalar multiplier to use. :return: An instance of the countermeasure. """ - th = get_type_hints(cls.__init__) - num = 0 - for name, arg_type in th.items(): - if name.startswith("mult"): - num += 1 - mults = [mult] * num + mults = [mult] * cls.nmults return cls(*mults, **kwargs) def _apply_formula(self, shortname: str, *points: Point) -> Point: -- cgit v1.2.3-70-g09d2