pss.pyi 779 B

12345678910111213141516
  1. from types import ModuleType
  2. from typing import Union, Callable
  3. from Cryptodome.PublicKey.RSA import RsaKey
  4. class PSS_SigScheme:
  5. def __init__(self, key: RsaKey, mgfunc: Callable, saltLen: int, randfunc: Callable) -> None: ...
  6. def can_sign(self) -> bool: ...
  7. def sign(self, msg_hash: ModuleType) -> bytes: ...
  8. def verify(self, msg_hash: ModuleType, signature: bytes) -> None: ...
  9. def MGF1(mgfSeed: bytes, maskLen: int, hash_gen: ModuleType) -> bytes: ...
  10. def _EMSA_PSS_ENCODE(mhash: ModuleType, emBits: int, randFunc: Callable, mgf: Callable, sLen: int) -> str: ...
  11. def _EMSA_PSS_VERIFY(mhash: ModuleType, em: str, emBits: int, mgf: Callable, sLen: int) -> None: ...
  12. def new(rsa_key: RsaKey, **kwargs: Union[Callable, int]) -> PSS_SigScheme: ...