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