"""
Type annotations for awscrt.checksums module.

Copyright 2024 Vlad Emelianov
"""

from typing import Any

from awscrt import NativeResource

def crc32(input: bytes, previous_crc32: int = ...) -> int: ...
def crc32c(input: bytes, previous_crc32c: int = ...) -> int: ...
def crc64nvme(input: bytes, previous_crc64nvme: int = 0) -> int: ...
def combine_crc32(crc32_result1: int, crc32_result2: int, data_length2: int) -> int: ...
def combine_crc32c(crc32c_result1: int, crc32c_result2: int, data_length2: int) -> int: ...
def combine_crc64nvme(crc64nvme_result1: int, crc64nvme_result2: int, data_length2: int) -> int: ...

class XXHash(NativeResource):
    def __init__(self, binding: Any) -> None: ...
    @staticmethod
    def new_xxhash64(seed: int = ...) -> XXHash: ...
    @staticmethod
    def new_xxhash3_64(seed: int = ...) -> XXHash: ...
    @staticmethod
    def new_xxhash3_128(seed: int = ...) -> XXHash: ...
    @staticmethod
    def compute_xxhash64(input: bytes | bytearray | memoryview, seed: int = ...) -> bytes: ...
    @staticmethod
    def compute_xxhash3_64(input: bytes | bytearray | memoryview, seed: int = ...) -> bytes: ...
    @staticmethod
    def compute_xxhash3_128(input: bytes | bytearray | memoryview, seed: int = ...) -> bytes: ...
    def update(self, input: bytes | bytearray | memoryview) -> None: ...
    def finalize(self) -> bytes: ...
