diff options
| author | J08nY | 2023-10-16 18:36:56 +0200 |
|---|---|---|
| committer | J08nY | 2023-10-16 18:36:56 +0200 |
| commit | 1b05664444fdaa785b90055d2a235ec81b4e9b0d (patch) | |
| tree | 397ca22a4b37268901e852945b59da04124b64f6 /pyecsca/ec/mult/window.py | |
| parent | 149e16806d9db7442b87f76259af740e27a77875 (diff) | |
| download | pyecsca-1b05664444fdaa785b90055d2a235ec81b4e9b0d.tar.gz pyecsca-1b05664444fdaa785b90055d2a235ec81b4e9b0d.tar.zst pyecsca-1b05664444fdaa785b90055d2a235ec81b4e9b0d.zip | |
Make multiplier reprs more concise.
Diffstat (limited to '')
| -rw-r--r-- | pyecsca/ec/mult/window.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pyecsca/ec/mult/window.py b/pyecsca/ec/mult/window.py index 8317965..f85a58a 100644 --- a/pyecsca/ec/mult/window.py +++ b/pyecsca/ec/mult/window.py @@ -58,7 +58,7 @@ class SlidingWindowMultiplier(AccumulatorMultiplier, ScalarMultiplier): return self.formulas == other.formulas and self.short_circuit == other.short_circuit and self.width == other.width and self.recoding_direction == other.recoding_direction and self.accumulation_order == other.accumulation_order def __repr__(self): - return f"{self.__class__.__name__}({tuple(self.formulas.values())}, short_circuit={self.short_circuit}, width={self.width}, recoding_direction={self.recoding_direction}, accumulation_order={self.accumulation_order})" + return f"{self.__class__.__name__}({', '.join(map(str, self.formulas.values()))}, short_circuit={self.short_circuit}, width={self.width}, recoding_direction={self.recoding_direction.name}, accumulation_order={self.accumulation_order.name})" def init(self, params: DomainParameters, point: Point): with PrecomputationAction(params, point): @@ -137,7 +137,7 @@ class FixedWindowLTRMultiplier(AccumulatorMultiplier, ScalarMultiplier): return self.formulas == other.formulas and self.short_circuit == other.short_circuit and self.m == other.m and self.accumulation_order == other.accumulation_order def __repr__(self): - return f"{self.__class__.__name__}({tuple(self.formulas.values())}, short_circuit={self.short_circuit}, m={self.m}, accumulation_order={self.accumulation_order})" + return f"{self.__class__.__name__}({', '.join(map(str, self.formulas.values()))}, short_circuit={self.short_circuit}, m={self.m}, accumulation_order={self.accumulation_order.name})" def init(self, params: DomainParameters, point: Point): with PrecomputationAction(params, point): |
