Add type annotations

Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
This commit is contained in:
Tom Cosgrove 2022-12-06 12:36:00 +00:00
parent c240600f24
commit 21d459d26a

View file

@ -251,10 +251,10 @@ class ModOperationCommon(OperationCommon):
# provides earlier/more robust input validation.
self.int_n = hex_to_int(val_n)
def to_montgomery(self, val) -> int:
def to_montgomery(self, val: int) -> int:
return (val * self.r) % self.int_n
def from_montgomery(self, val) -> int:
def from_montgomery(self, val: int) -> int:
return (val * self.r_inv) % self.int_n
@property