X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=pygost%2Fstubs%2Fpygost%2Fgost3410.pyi;h=ed5918638c7777ff62e593a21f7d4e5c010e7694;hb=ff0ff768110b9bd69d030a1423bad515ea4c32bb;hp=aacb9ab04df00b34a833503a1cb58e7fd36fd11f;hpb=282cb5e23df11f9d5e3c29185f0e6c72f038f731;p=pygost.git diff --git a/pygost/stubs/pygost/gost3410.pyi b/pygost/stubs/pygost/gost3410.pyi index aacb9ab..ed59186 100644 --- a/pygost/stubs/pygost/gost3410.pyi +++ b/pygost/stubs/pygost/gost3410.pyi @@ -2,7 +2,9 @@ from typing import Dict from typing import Tuple -CURVE_PARAMS = ... # type: Dict[str, Tuple[bytes, bytes, bytes, bytes, bytes, bytes]] +DEFAULT_CURVE = ... # type: GOST3410Curve +CURVES = ... # type: Dict[str, GOST3410Curve] +MODE2SIZE = ... # type: Dict[int, int] PublicKey = Tuple[int, int] @@ -21,31 +23,25 @@ class GOST3410Curve(object): def exp(self, degree: int, x: int=..., y: int=...) -> int: ... -def public_key(curve: GOST3410Curve, private_key: int) -> PublicKey: ... +def public_key(curve: GOST3410Curve, prv: int) -> PublicKey: ... -def sign( - curve: GOST3410Curve, - private_key: int, - digest: bytes, - size: int=..., -) -> bytes: ... +def sign(curve: GOST3410Curve, prv: int, digest: bytes, mode: int=...) -> bytes: ... def verify( curve: GOST3410Curve, - pubkeyX: int, - pubkeyY: int, + pub: PublicKey, digest: bytes, signature: bytes, - size: int=..., + mode: int=..., ) -> bool: ... -def prv_unmarshal(private_key: bytes) -> int: ... +def prv_unmarshal(prv: bytes) -> int: ... -def pub_marshal(pub: PublicKey, mode: int) -> bytes: ... +def pub_marshal(pub: PublicKey, mode: int=...) -> bytes: ... -def pub_unmarshal(pub: bytes, mode: int) -> PublicKey: ... +def pub_unmarshal(pub: bytes, mode: int=...) -> PublicKey: ...