Skip to content

Commit 17af889

Browse files
authored
Add stubs for TgCrypto (#12469)
1 parent daefde0 commit 17af889

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# stubtest doesn't recognize these function as taking only positional-only arguments.
2+
tgcrypto.cbc256_decrypt
3+
tgcrypto.cbc256_encrypt
4+
tgcrypto.ctr256_decrypt
5+
tgcrypto.ctr256_encrypt
6+
tgcrypto.ige256_decrypt
7+
tgcrypto.ige256_encrypt

stubs/TgCrypto/METADATA.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
version = "1.2.*"
2+
upstream_repository = "https://github.com/pyrogram/tgcrypto"

stubs/TgCrypto/tgcrypto/__init__.pyi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from typing_extensions import Buffer
2+
3+
def ige256_encrypt(data: Buffer, key: Buffer, iv: Buffer, /) -> bytes: ...
4+
def ige256_decrypt(data: Buffer, key: Buffer, iv: Buffer, /) -> bytes: ...
5+
def ctr256_encrypt(data: Buffer, key: Buffer, iv: Buffer, state: Buffer, /) -> bytes: ...
6+
def ctr256_decrypt(data: Buffer, key: Buffer, iv: Buffer, state: Buffer, /) -> bytes: ...
7+
def cbc256_encrypt(data: Buffer, key: Buffer, iv: Buffer, /) -> bytes: ...
8+
def cbc256_decrypt(data: Buffer, key: Buffer, iv: Buffer, /) -> bytes: ...

0 commit comments

Comments
 (0)