]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/stubs/pygost/gost28147.pyi
Completely get rid of addmod
[pygost.git] / pygost / stubs / pygost / gost28147.pyi
index c6b0aa2865d57fc0663dc3e55a359f67dbe4d457..0c513e0a4e7e3d3c4fe77b2b8e728d247a65409a 100644 (file)
@@ -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: ...