X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=pygost%2Fstubs%2Fpygost%2Fgost3413.pyi;h=4cfd694076d3d06e184ec33f937a4cf2d6c94f31;hb=a9f7e3dfc59a987c3d6cce4108f18d9f6b72867b;hp=dddb205ba94192f8c7959ab4de51415aca2525ba;hpb=ba733f4a6983a80b8238478174c771243b34ebee;p=pygost.git diff --git a/pygost/stubs/pygost/gost3413.pyi b/pygost/stubs/pygost/gost3413.pyi index dddb205..4cfd694 100644 --- a/pygost/stubs/pygost/gost3413.pyi +++ b/pygost/stubs/pygost/gost3413.pyi @@ -1,3 +1,6 @@ +from typing import Callable + + def pad_size(data_size: int, blocksize: int) -> int: ... @@ -7,4 +10,72 @@ def pad1(data: bytes, blocksize: int) -> bytes: ... def pad2(data: bytes, blocksize: int) -> bytes: ... +def unpad2(data: bytes, blocksize: int) -> bytes: ... + + def pad3(data: bytes, blocksize: int) -> bytes: ... + + +def ecb_encrypt(encrypter: Callable[[bytes], bytes], bs: int, pt: bytes) -> bytes: ... + + +def ecb_decrypt(decrypter: Callable[[bytes], bytes], bs: int, ct: bytes) -> bytes: ... + + +def acpkm(encrypter: Callable[[bytes], bytes], bs: int) -> bytes: ... + + +def ctr(encrypter: Callable[[bytes], bytes], bs: int, data: bytes, iv: bytes) -> bytes: ... + + +def ctr_acpkm( + algo_class: object, + encrypter: Callable[[bytes], bytes], + section_size: int, + bs: int, + data: bytes, + iv: bytes, +) -> bytes: ... + + +def ofb(encrypter: Callable[[bytes], bytes], bs: int, data: bytes, iv: bytes) -> bytes: ... + + +def cbc_encrypt(encrypter: Callable[[bytes], bytes], bs: int, pt: bytes, iv: bytes) -> bytes: ... + + +def cbc_decrypt(decrypter: Callable[[bytes], bytes], bs: int, ct: bytes, iv: bytes) -> bytes: ... + + +def cfb_encrypt(encrypter: Callable[[bytes], bytes], bs: int, pt: bytes, iv: bytes) -> bytes: ... + + +def cfb_decrypt(encrypter: Callable[[bytes], bytes], bs: int, ct: bytes, iv: bytes) -> bytes: ... + + +def mac(encrypter: Callable[[bytes], bytes], bs: int, data: bytes) -> bytes: ... + + +def acpkm_master( + algo_class: object, + encrypter: Callable[[bytes], bytes], + key_section_size: int, + bs: int, + keymat_len: int, +) -> bytes: ... + + +def mac_acpkm_master( + algo_class: object, + encrypter: Callable[[bytes], bytes], + key_section_size: int, + section_size: int, + bs: int, + data: bytes, +) -> bytes: ... + + +def pad_iso10126(data: bytes, blocksize: int) -> bytes: ... + + +def unpad_iso10126(data: bytes, blocksize: int) -> bytes: ...