CMAC.pyi 852 B

12345678910111213141516171819202122232425262728293031
  1. from types import ModuleType
  2. from typing import Union, Dict, Any
  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[str, Any],
  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[str, Any] = ...,
  23. mac_len: int = ...,
  24. update_after_digest: bool = ...) -> CMAC: ...