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

import dissect.cstruct as __cs__

class _c_tpm(__cs__.cstruct):
    TPM2_SHA1_DIGEST_SIZE: Literal[20] = ...
    TPM2_SHA256_DIGEST_SIZE: Literal[32] = ...
    TPM2_SHA384_DIGEST_SIZE: Literal[48] = ...
    TPM2_SHA512_DIGEST_SIZE: Literal[64] = ...
    class PCR_BITMAP(__cs__.Enum):
        PCR0_HOST_DRIVER_CODE = ...
        PCR1_HOST_DRIVER_DATA = ...
        PCR2_UEFI_DRIVER_CODE = ...
        PCR3_UEFI_DRIVER_DATA = ...
        PCR4_UEFI_BOOT_MANAGER_CODE = ...
        PCR5_UEFI_BOOT_MANAGER_DATA = ...
        PCR6_HOST_PLATFORM_EVENT = ...
        PCR7_SECURE_BOOT_STATE = ...
        PCR8_RESERVED = ...
        PCR9_RESERVED = ...
        PCR10_RESERVED = ...
        PCR11_BITLOCKER_ACCESS_CONTROL = ...
        PCR12_DATA_EVENT = ...
        PCR13_KERNEL_BOOT_DRIVER = ...
        PCR14_BOOT_AUTHORITY = ...
        PCR15_UNKNOWN = ...
        PCR16_DEBUG = ...
        PCR17_RESERVED = ...
        PCR18_RESERVED = ...
        PCR19_RESERVED = ...
        PCR20_RESERVED = ...
        PCR21_RESERVED = ...
        PCR22_RESERVED = ...
        PCR23_RESERVED = ...

    class _FVE_DATUM_TPM_ENC_BLOB(__cs__.Structure):
        PcrBitmap: _c_tpm.uint32
        PublicSize: _c_tpm.uint16
        Public: __cs__.CharArray
        PrivateSize: _c_tpm.uint16
        Private: __cs__.CharArray
        PcrDigestSize: _c_tpm.uint16
        PcrDigest: __cs__.CharArray
        PcrBitmapSize: _c_tpm.uint8
        PcrBitmap2: __cs__.CharArray
        @overload
        def __init__(
            self,
            PcrBitmap: _c_tpm.uint32 | None = ...,
            PublicSize: _c_tpm.uint16 | None = ...,
            Public: __cs__.CharArray | None = ...,
            PrivateSize: _c_tpm.uint16 | None = ...,
            Private: __cs__.CharArray | None = ...,
            PcrDigestSize: _c_tpm.uint16 | None = ...,
            PcrDigest: __cs__.CharArray | None = ...,
            PcrBitmapSize: _c_tpm.uint8 | None = ...,
            PcrBitmap2: __cs__.CharArray | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    FVE_DATUM_TPM_ENC_BLOB: TypeAlias = _FVE_DATUM_TPM_ENC_BLOB

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