KMAC128.pyi 903 B

123456789101112131415161718192021222324252627282930313233
  1. from typing import Union
  2. from types import ModuleType
  3. Buffer = Union[bytes, bytearray, memoryview]
  4. class KMAC_Hash(object):
  5. def __init__(self,
  6. data: Buffer,
  7. key: Buffer,
  8. mac_len: int,
  9. custom: Buffer,
  10. oid_variant: str,
  11. cshake: ModuleType,
  12. rate: int) -> None: ...
  13. def update(self, data: Buffer) -> KMAC_Hash: ...
  14. def digest(self) -> bytes: ...
  15. def hexdigest(self) -> str: ...
  16. def verify(self, mac_tag: Buffer) -> None: ...
  17. def hexverify(self, hex_mac_tag: str) -> None: ...
  18. def new(self,
  19. data: Buffer = ...,
  20. mac_len: int = ...,
  21. key: Buffer = ...,
  22. custom: Buffer = ...) -> KMAC_Hash: ...
  23. def new(key: Buffer,
  24. data: Buffer = ...,
  25. mac_len: int = ...,
  26. custom: Buffer = ...) -> KMAC_Hash: ...