# Generated by cstruct-stubgen
from typing import BinaryIO, Literal, TypeAlias, overload

import dissect.cstruct as __cs__

class _c_adcrypt(__cs__.cstruct):
    ADCRYPT_MAGIC: Literal["ADCRYPT\x00"] = ...
    class EncAlgo(__cs__.Enum):
        AES128 = ...
        AES192 = ...
        AES256 = ...

    class HashAlgo(__cs__.Enum):
        SHA256 = ...
        SHA512 = ...

    class Header(__cs__.Structure):
        magic: __cs__.CharArray
        version: _c_adcrypt.uint32
        header_size: _c_adcrypt.uint32
        num_passwords: _c_adcrypt.int16
        num_raw_keys: _c_adcrypt.int16
        num_certificates: _c_adcrypt.int16
        reserved: __cs__.CharArray
        enc_algo: _c_adcrypt.EncAlgo
        hash_algo: _c_adcrypt.HashAlgo
        pbkdf2_count: _c_adcrypt.uint32
        salt_len: _c_adcrypt.uint32
        key_len: _c_adcrypt.uint32
        hmac_len: _c_adcrypt.uint32
        enc_salt: __cs__.CharArray
        enc_key: __cs__.CharArray
        hmac_enc_key: __cs__.CharArray
        @overload
        def __init__(
            self,
            magic: __cs__.CharArray | None = ...,
            version: _c_adcrypt.uint32 | None = ...,
            header_size: _c_adcrypt.uint32 | None = ...,
            num_passwords: _c_adcrypt.int16 | None = ...,
            num_raw_keys: _c_adcrypt.int16 | None = ...,
            num_certificates: _c_adcrypt.int16 | None = ...,
            reserved: __cs__.CharArray | None = ...,
            enc_algo: _c_adcrypt.EncAlgo | None = ...,
            hash_algo: _c_adcrypt.HashAlgo | None = ...,
            pbkdf2_count: _c_adcrypt.uint32 | None = ...,
            salt_len: _c_adcrypt.uint32 | None = ...,
            key_len: _c_adcrypt.uint32 | None = ...,
            hmac_len: _c_adcrypt.uint32 | None = ...,
            enc_salt: __cs__.CharArray | None = ...,
            enc_key: __cs__.CharArray | None = ...,
            hmac_enc_key: __cs__.CharArray | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

# Technically `c_adcrypt` is an instance of `_c_adcrypt`, but then we can't use it in type hints
c_adcrypt: TypeAlias = _c_adcrypt
