HMAC.pyi 649 B

12345678910111213141516171819202122232425
  1. from types import ModuleType
  2. from typing import Union, Dict
  3. Buffer = Union[bytes, bytearray, memoryview]
  4. digest_size: int
  5. class HMAC(object):
  6. digest_size: int
  7. def __init__(self,
  8. key: Buffer,
  9. msg: Buffer,
  10. digestmod: ModuleType) -> None: ...
  11. def update(self, msg: Buffer) -> HMAC: ...
  12. def copy(self) -> HMAC: ...
  13. def digest(self) -> bytes: ...
  14. def hexdigest(self) -> str: ...
  15. def verify(self, mac_tag: Buffer) -> None: ...
  16. def hexverify(self, hex_mac_tag: str) -> None: ...
  17. def new(key: Buffer,
  18. msg: Buffer = ...,
  19. digestmod: ModuleType = ...) -> HMAC: ...