# Type stubs for borg.legacy.crypto.low_level
# This file provides type hints for the Cython extension module

class AES:
    """A thin wrapper around the OpenSSL EVP cipher API - for legacy key file encryption."""

    def __init__(self, enc_key: bytes, iv: int | bytes | None = None) -> None: ...
    def encrypt(self, data: bytes, iv: int | bytes | None = None) -> bytes: ...
    def decrypt(self, data: bytes) -> bytes: ...
    def block_count(self, length: int) -> int: ...
    def set_iv(self, iv: int | bytes) -> None: ...
    def next_iv(self) -> int: ...
