]> Cypherpunks.ru repositories - pygost.git/commitdiff
PEP8 typing stubs
authorSergey Matveev <stargrave@stargrave.org>
Mon, 19 Oct 2020 10:07:15 +0000 (13:07 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Mon, 19 Oct 2020 10:54:13 +0000 (13:54 +0300)
pygost/stubs/pygost/gost28147.pyi
pygost/stubs/pygost/gost28147_mac.pyi
pygost/stubs/pygost/gost3410.pyi
pygost/stubs/pygost/gost3410_vko.pyi
pygost/stubs/pygost/gost34112012.pyi
pygost/stubs/pygost/gost34112012256.pyi
pygost/stubs/pygost/gost34112012512.pyi
pygost/stubs/pygost/gost341194.pyi
pygost/stubs/pygost/kdf.pyi
pygost/stubs/pygost/utils.pyi

index 0c513e0a4e7e3d3c4fe77b2b8e728d247a65409a..be3126137c5224c605f7c44a04f3c81da63e624a 100644 (file)
@@ -38,64 +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=...,
+    sbox: str = ...,
 ) -> bytes: ...
 
 
 def ecb_decrypt(
     key: bytes,
     data: bytes,
-    sbox: str=...,
+    sbox: str = ...,
 ) -> bytes: ...
 
 
 def cbc_encrypt(
     key: bytes,
     data: bytes,
-    iv: bytes=...,
-    pad: bool=...,
-    sbox: str=...,
-    mesh: bool=...,
+    iv: bytes = ...,
+    pad: bool = ...,
+    sbox: str = ...,
+    mesh: bool = ...,
 ) -> bytes: ...
 
 
 def cbc_decrypt(
     key: bytes,
     data: bytes,
-    pad: bool=...,
-    sbox: str=...,
-    mesh: bool=...,
+    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: ...
index 4386f376af7414a7414e4e2c3181cca71e7e0205..70d90d69fadd15c1e638aeb6f724de8c90059788 100644 (file)
@@ -5,9 +5,9 @@ class MAC(PEP247):
     def __init__(
         self,
         key: bytes,
-        data: bytes=...,
-        iv: bytes=...,
-        sbox: str=...,
+        data: bytes = ...,
+        iv: bytes = ...,
+        sbox: str = ...,
     ) -> None: ...
 
     @property
@@ -22,4 +22,4 @@ class MAC(PEP247):
     def hexdigest(self) -> str: ...
 
 
-def new(key: bytes, data: bytes=..., iv: bytes=..., sbox: str=...) -> MAC: ...
+def new(key: bytes, data: bytes = ..., iv: bytes = ..., sbox: str = ...) -> MAC: ...
index ee0e9b6de227720e3dbd784e47bf726ef3aac1b0..4be9bbbadbd77ccbd02e7381fa03e9a94e6cd999 100644 (file)
@@ -33,7 +33,7 @@ class GOST3410Curve(object):
 
     def pos(self, v: int) -> int: ...
 
-    def exp(self, degree: int, x: int=..., y: int=...) -> int: ...
+    def exp(self, degree: int, x: int = ..., y: int = ...) -> int: ...
 
     def st(self) -> Tuple[int, int]: ...
 
@@ -46,7 +46,7 @@ class GOST3410Curve(object):
 def public_key(curve: GOST3410Curve, prv: int) -> PublicKey: ...
 
 
-def sign(curve: GOST3410Curve, prv: int, digest: bytes, rand: bytes=None) -> bytes: ...
+def sign(curve: GOST3410Curve, prv: int, digest: bytes, rand: bytes = None) -> bytes: ...
 
 
 def verify(curve: GOST3410Curve, pub: PublicKey, digest: bytes, signature: bytes) -> bool: ...
index c6d35e5a0d19c7520e04251dad975af6b28acf3a..bb9c54bc0b7a3ba3d2f5080278d5051104adb4bf 100644 (file)
@@ -8,7 +8,7 @@ def ukm_unmarshal(ukm: bytes) -> int: ...
 def kek_34102001(curve: GOST3410Curve, prv: int, pub: PublicKey, ukm: int) -> bytes: ...
 
 
-def kek_34102012256(curve: GOST3410Curve, prv: int, pub: PublicKey, ukm: int=...) -> bytes: ...
+def kek_34102012256(curve: GOST3410Curve, prv: int, pub: PublicKey, ukm: int = ...) -> bytes: ...
 
 
-def kek_34102012512(curve: GOST3410Curve, prv: int, pub: PublicKey, ukm: int=...) -> bytes: ...
+def kek_34102012512(curve: GOST3410Curve, prv: int, pub: PublicKey, ukm: int = ...) -> bytes: ...
index dd0cc4c35fdc4d2433cbd374801378c9ddb824c3..3d5cc41454e7c4d4a011f6a0a4a0c04fae7da2aa 100644 (file)
@@ -4,7 +4,7 @@ from pygost.iface import PEP247
 class GOST34112012(PEP247):
     block_size = ...  # type: int
 
-    def __init__(self, data: bytes=..., digest_size: int=...) -> None: ...
+    def __init__(self, data: bytes = ..., digest_size: int = ...) -> None: ...
 
     @property
     def digest_size(self) -> int: ...
index 1bae785a45cb2e2e30f9f9773dc509b57e1e7512..a1d2a0155c75a50f55cac8157a9ee8b0b8a61f76 100644 (file)
@@ -4,7 +4,7 @@ from pygost.iface import PEP247
 class GOST34112012256(PEP247):
     block_size = ...  # type: int
 
-    def __init__(self, data: bytes=...) -> None: ...
+    def __init__(self, data: bytes = ...) -> None: ...
 
     @property
     def digest_size(self) -> int: ...
@@ -18,4 +18,4 @@ class GOST34112012256(PEP247):
     def hexdigest(self) -> str: ...
 
 
-def new(data: bytes=...) -> GOST34112012256: ...
+def new(data: bytes = ...) -> GOST34112012256: ...
index 0a3d7b33c4348dd4e85f9381ff02a778e047302f..349bddd29055926d34baf575675fba2d31db7d01 100644 (file)
@@ -4,7 +4,7 @@ from pygost.iface import PEP247
 class GOST34112012512(PEP247):
     block_size = ...  # type: int
 
-    def __init__(self, data: bytes=...) -> None: ...
+    def __init__(self, data: bytes = ...) -> None: ...
 
     @property
     def digest_size(self) -> int: ...
@@ -18,6 +18,7 @@ class GOST34112012512(PEP247):
     def hexdigest(self) -> str: ...
 
 
-def new(data: bytes=...) -> GOST34112012512: ...
+def new(data: bytes = ...) -> GOST34112012512: ...
+
 
 def pbkdf2(password: bytes, salt: bytes, iterations: int, dklen: int) -> bytes: ...
index 87492c8642c59ba2d96f8d8783bcc9b8a4a76b9a..24de2e4d595f324003bbd79b0fa6f30c37d7caca 100644 (file)
@@ -5,7 +5,7 @@ class GOST341194(PEP247):
     sbox = ...  # type: str
     block_size = ...  # type: int
 
-    def __init__(self, data: bytes=..., sbox: str=...) -> None: ...
+    def __init__(self, data: bytes = ..., sbox: str = ...) -> None: ...
 
     @property
     def digest_size(self) -> int: ...
@@ -19,7 +19,7 @@ class GOST341194(PEP247):
     def hexdigest(self) -> str: ...
 
 
-def new(data: bytes=..., sbox: str=...) -> GOST341194: ...
+def new(data: bytes = ..., sbox: str = ...) -> GOST341194: ...
 
 
 def pbkdf2(password: bytes, salt: bytes, iterations: int, dklen: int) -> bytes: ...
index 932d6ef5ba0d7776a9f8989b125bb28c2d4db4e7..ac5cf2a28471f6dda894d29b132132c7071321bf 100644 (file)
@@ -14,7 +14,7 @@ def kdf_tree_gostr3411_2012_256(
         label: bytes,
         seed: bytes,
         keys: int,
-        i_len=1,
+        i_len: int = 1,
 ) -> Sequence[bytes]: ...
 
 
index 1b5f4619594fc1324d5bab3d79802328fdab9216..aff49bcabff9fa2d85e0b5e2ec8d0a03bc01d8a9 100644 (file)
@@ -14,7 +14,7 @@ def hexenc(data: bytes) -> str: ...
 def bytes2long(raw: bytes) -> int: ...
 
 
-def long2bytes(n: int, size: int=...) -> bytes: ...
+def long2bytes(n: int, size: int = ...) -> bytes: ...
 
 
 def modinvert(a: int, n: int) -> int: ...