PKCS1_v1_5.pyi 571 B

1234567891011121314151617
  1. from typing import Callable, Union, Any, Optional
  2. from tls.Crypto.PublicKey.RSA import RsaKey
  3. Buffer = Union[bytes, bytearray, memoryview]
  4. class PKCS115_Cipher:
  5. def __init__(self,
  6. key: RsaKey,
  7. randfunc: Callable[[int], bytes]) -> None: ...
  8. def can_encrypt(self) -> bool: ...
  9. def can_decrypt(self) -> bool: ...
  10. def encrypt(self, message: Buffer) -> bytes: ...
  11. def decrypt(self, ciphertext: Buffer) -> bytes: ...
  12. def new(key: Buffer,
  13. randfunc: Optional[Callable[[int], bytes]] = ...) -> PKCS115_Cipher: ...