PKCS1_v1_5.pyi 451 B

12345678910111213141516
  1. from typing import Optional
  2. from typing_extensions import Protocol
  3. from Crypto.PublicKey.RSA import RsaKey
  4. class Hash(Protocol):
  5. def digest(self) -> bytes: ...
  6. class PKCS115_SigScheme:
  7. def __init__(self, rsa_key: RsaKey) -> None: ...
  8. def can_sign(self) -> bool: ...
  9. def sign(self, msg_hash: Hash) -> bytes: ...
  10. def verify(self, msg_hash: Hash, signature: bytes) -> bool: ...
  11. def new(rsa_key: RsaKey) -> PKCS115_SigScheme: ...