]> Cypherpunks.ru repositories - pygost.git/blobdiff - pygost/stubs/pygost/gost28147.pyi
PEP8 typing stubs
[pygost.git] / pygost / stubs / pygost / gost28147.pyi
index c6b0aa2865d57fc0663dc3e55a359f67dbe4d457..be3126137c5224c605f7c44a04f3c81da63e624a 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: ...
 
 
@@ -37,48 +38,64 @@ def ecb(
     key: bytes,
     data: bytes,
     action: Callable[[str, bytes, Words], Words],
-    sbox: str=...,
+    sbox: str = ...,
+) -> 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=...,
+    iv: bytes = ...,
+    pad: bool = ...,
+    sbox: str = ...,
+    mesh: bool = ...,
 ) -> bytes: ...
 
 
 def cbc_decrypt(
     key: bytes,
     data: bytes,
-    pad: bool=...,
-    sbox: str=...,
+    pad: bool = ...,
+    sbox: str = ...,
+    mesh: bool = ...,
 ) -> bytes: ...
 
 
 def cnt(
     key: bytes,
     data: bytes,
-    iv: bytes=...,
-    sbox: str=...,
+    iv: bytes = ...,
+    sbox: str = ...,
 ) -> bytes: ...
 
 
 def cfb_encrypt(
     key: bytes,
     data: bytes,
-    iv: bytes=...,
-    sbox: str=...,
-    mesh: bool=...,
+    iv: bytes = ...,
+    sbox: str = ...,
+    mesh: bool = ...,
 ) -> bytes: ...
 
 
 def cfb_decrypt(
     key: bytes,
     data: bytes,
-    iv: bytes=...,
-    sbox: str=...,
-    mesh: bool=...,
+    iv: bytes = ...,
+    sbox: str = ...,
+    mesh: bool = ...,
 ) -> bytes: ...