CMAC.pyi 797 B

123456789101112131415161718192021222324252627282930
  1. from types import ModuleType
  2. from typing import Union, Dict
  3. Buffer = Union[bytes, bytearray, memoryview]
  4. digest_size: int
  5. class CMAC(object):
  6. digest_size: int
  7. def __init__(self,
  8. key: Buffer,
  9. msg: Buffer,
  10. ciphermod: ModuleType,
  11. cipher_params: dict,
  12. mac_len: int, update_after_digest: bool) -> None: ...
  13. def update(self, data: Buffer) -> CMAC: ...
  14. def copy(self) -> CMAC: ...
  15. def digest(self) -> bytes: ...
  16. def hexdigest(self) -> str: ...
  17. def verify(self, mac_tag: Buffer) -> None: ...
  18. def hexverify(self, hex_mac_tag: str) -> None: ...
  19. def new(key: Buffer,
  20. msg: Buffer = ...,
  21. ciphermod: ModuleType = ...,
  22. cipher_params: Dict = ...,
  23. mac_len: int = ...,
  24. update_after_digest: bool = ...) -> CMAC: ...