# SPDX-FileCopyrightText: 2025 Marco Ricci <software@the13thletter.info>
#
# SPDX-License-Identifier: Zlib
from __future__ import annotations
import base64
import contextlib
import json
import pathlib
import types
from typing import TYPE_CHECKING
import click.testing
import hypothesis
import pytest
from hypothesis import strategies
import tests
from derivepassphrase import _types, cli, exporter
from derivepassphrase.exporter import storeroom, vault_native
cryptography = pytest.importorskip('cryptography', minversion='38.0')
from cryptography.hazmat.primitives import ( # noqa: E402
ciphers,
hashes,
hmac,
padding,
)
from cryptography.hazmat.primitives.ciphers import ( # noqa: E402
algorithms,
modes,
)
if TYPE_CHECKING:
from collections.abc import Callable
from typing import Any
from typing_extensions import Buffer, Literal
class Parametrize(types.SimpleNamespace):
BAD_CONFIG = pytest.mark.parametrize(
'config', ['xxx', 'null', '{"version": 255}']
)
# TODO(the-13th-letter): Rename "result" to "config_data".
VAULT_NATIVE_CONFIG_DATA = pytest.mark.parametrize(
['config', 'format', 'result'],
[
pytest.param(