X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;ds=sidebyside;f=pygost%2Fstubs%2Fpygost%2Fgost28147.pyi;h=0c513e0a4e7e3d3c4fe77b2b8e728d247a65409a;hb=b2e90391aebf713b34023e379803fbf968e5aed8;hp=c6b0aa2865d57fc0663dc3e55a359f67dbe4d457;hpb=34c9c9a4f95eecfee75fc36d75d2ee45d1054a25;p=pygost.git diff --git a/pygost/stubs/pygost/gost28147.pyi b/pygost/stubs/pygost/gost28147.pyi index c6b0aa2..0c513e0 100644 --- a/pygost/stubs/pygost/gost28147.pyi +++ b/pygost/stubs/pygost/gost28147.pyi @@ -1,8 +1,12 @@ from typing import Callable +from typing import Dict from typing import Sequence from typing import Tuple +SBOXES = ... # type: Dict[str, Tuple[Tuple[int, ...], ...]] +BLOCKSIZE = ... # type: int + Words = Tuple[int, int] @@ -12,9 +16,6 @@ def block2ns(data: bytes) -> Words: ... def ns2block(ns: Words) -> bytes: ... -def addmod(x: int, y: int, mod: int=...) -> int: ... - - def validate_key(key: bytes) -> None: ... @@ -41,12 +42,27 @@ def ecb( ) -> bytes: ... +def ecb_encrypt( + key: bytes, + data: bytes, + sbox: str=..., +) -> bytes: ... + + +def ecb_decrypt( + key: bytes, + data: bytes, + sbox: str=..., +) -> bytes: ... + + def cbc_encrypt( key: bytes, data: bytes, iv: bytes=..., pad: bool=..., sbox: str=..., + mesh: bool=..., ) -> bytes: ... @@ -55,6 +71,7 @@ def cbc_decrypt( data: bytes, pad: bool=..., sbox: str=..., + mesh: bool=..., ) -> bytes: ...