]> Cypherpunks.ru repositories - pygost.git/commitdiff
Add missing gost28147: SBOXES, BLOCKSIZE, ecb_* mypy stubs
authorSergey Matveev <stargrave@stargrave.org>
Thu, 8 Dec 2016 20:37:16 +0000 (23:37 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 8 Dec 2016 20:37:16 +0000 (23:37 +0300)
pygost/stubs/pygost/gost28147.pyi

index c6b0aa2865d57fc0663dc3e55a359f67dbe4d457..1c0986f73bbf7343249e70a68fef2e66f83d5749 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]
 
 
@@ -41,6 +45,20 @@ 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,