]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/stubs/pygost/gost3410.pyi
PEP8 typing stubs
[pygost.git] / pygost / stubs / pygost / gost3410.pyi
index 66494455102d91c4fad69c1f773d451f72ef29a3..4be9bbbadbd77ccbd02e7381fa03e9a94e6cd999 100644 (file)
@@ -4,7 +4,6 @@ from typing import Tuple
 
 DEFAULT_CURVE = ...  # type: GOST3410Curve
 CURVES = ...  # type: Dict[str, GOST3410Curve]
-MODE2SIZE = ...  # type: Dict[int, int]
 PublicKey = Tuple[int, int]
 
 
@@ -34,15 +33,20 @@ class GOST3410Curve(object):
 
     def pos(self, v: int) -> int: ...
 
-    def exp(self, degree: int, x: int=..., y: int=...) -> int: ...
+    def exp(self, degree: int, x: int = ..., y: int = ...) -> int: ...
 
     def st(self) -> Tuple[int, int]: ...
 
+    @property
+    def point_size(self) -> int: ...
+
+    def contains(self, point: Tuple[int, int]) -> bool: ...
+
 
 def public_key(curve: GOST3410Curve, prv: int) -> PublicKey: ...
 
 
-def sign(curve: GOST3410Curve, prv: int, digest: bytes, rand: bytes=None) -> bytes: ...
+def sign(curve: GOST3410Curve, prv: int, digest: bytes, rand: bytes = None) -> bytes: ...
 
 
 def verify(curve: GOST3410Curve, pub: PublicKey, digest: bytes, signature: bytes) -> bool: ...