INNER CODE UNIT · Python

__enter__

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

    def __enter__(self: TSignature) -> TSignature:
        return self

    def __exit__(
        self,
        exc_type: Union[type[BaseException], None],
        exc_value: Union[BaseException, None],
        traceback: Union[TracebackType, None],
    ) -> None:
        self.free()

    def generate_keypair(self) -> bytes:
        """
        Generate a new keypair and returns the public key.

        If needed, the secret key can be obtained with export_secret_key().
        """
        public_key: ct.Array[ct.c_char] = ct.create_string_buffer(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…