aboutsummaryrefslogtreecommitdiff
path: root/frozen_deps/Cryptodome/Hash/Poly1305.pyi
blob: f97a14a01e2c70ff25bc1a40167bd9c4d53a8b36 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from types import ModuleType
from typing import Union

Buffer = Union[bytes, bytearray, memoryview]

class Poly1305_MAC(object):
    block_size: int
    digest_size: int
    oid: str

    def __init__(self,
                 r : int,
                 s : int,
                 data : Buffer) -> None: ...
    def update(self, data: Buffer) -> Poly1305_MAC: ...
    def digest(self) -> bytes: ...
    def hexdigest(self) -> str: ...
    def verify(self, mac_tag: Buffer) -> None: ...
    def hexverify(self, hex_mac_tag: str) -> None: ...

def new(key: Buffer,
        cipher: ModuleType,
        nonce: Buffer = ...,
        data: Buffer = ...) -> Poly1305_MAC: ...