INNER CODE UNIT · Python

__init__

open-quantum-safe/liboqs-python · oqs/oqs.py:351

    def __init__(self, alg_name: str, enabled: Optional[Iterable[str]] = None) -> None:
        """
        Initialize the exception.

        :param alg_name: Requested algorithm name.
        :param enabled: A list of enabled algorithms to include in the message. Defaults to `None`.
        """
        enabled_str = ""
        if enabled is not None:
            enabled_str = ", ".join(enabled)
            enabled_str = f". Enabled algorithms: {enabled_str}"

        self.alg_name = alg_name
        self.message = f"{alg_name} is supported but not enabled by OQS" + enabled_str


class KeyEncapsulation(ct.Structure):
    """

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…