Debian Codegraph @

lib/Crypto/Cipher/PKCS1_v1_5.pyi

raw symbols SCIP
1 from typing import Callable, Union, Any, Optional, TypeVar
2
3 from Crypto.PublicKey.RSA import RsaKey
4
5 Buffer = Union[bytes, bytearray, memoryview]
6 T = TypeVar('T')
7
8 class PKCS115_Cipher:
9 def __init__(self,
10 key: RsaKey,
11 randfunc: Callable[[int], bytes]) -> None: ...
12 def can_encrypt(self) -> bool: ...
13 def can_decrypt(self) -> bool: ...
14 def encrypt(self, message: Buffer) -> bytes: ...
15 def decrypt(self, ciphertext: Buffer,
16 sentinel: T,
17 expected_pt_len: Optional[int] = ...) -> Union[bytes, T]: ...
18
19 def new(key: RsaKey,
20 randfunc: Optional[Callable[[int], bytes]] = ...) -> PKCS115_Cipher: ...