INNER CODE UNIT · Python
__enter__
open-quantum-safe/liboqs-python · oqs/oqs.py:444
def __enter__(self: TKeyEncapsulation) -> TKeyEncapsulation:
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_seed(self, seed: bytes) -> bytes:
"""
Generate a new keypair using the provided seed and returns the public key.
:param seed: A seed to use for key generation.
If the seed is None, a random seed will be generated.
"""