Main

Main CLI module.

crypto_condor.cli.main.method(primitive, out=None)

Command to get a method guide in Markdown.

Parameters:
  • primitive (Annotated[str, <typer.models.ArgumentInfo object at 0x7f6f20307090>]) – The method guide to get.

  • out (Annotated[Path | None, <typer.models.OptionInfo object at 0x7f6f2071da10>]) – Where to save the guide.

crypto_condor.cli.main.list_command()

List the currently supported primitives.

crypto_condor.cli.main.wrap(
primitive,
directory=None,
language='',
show_languages=False,
force=False,
wrapper_example=0,
)

Fetches a wrapper template.

Parameters:
  • primitive (Annotated[str, <typer.models.ArgumentInfo object at 0x7f6f2071c250>]) – The primitive to get a wrapper of.

  • directory (Annotated[str | None, <typer.models.OptionInfo object at 0x7f6f2071c2d0>]) – Where to copy the template to, current working directory by default.

  • language (Annotated[str, <typer.models.OptionInfo object at 0x7f6f2071c3d0>]) – The programming language of the wrapper.

  • show_languages (Annotated[bool, <typer.models.OptionInfo object at 0x7f6f2071c4d0>]) – An option to display a list of primitives and the languages that have corresponding wrappers available. It’s an eager option that uses the list_languages() callback, so the argument is not used in the function itself.

  • force (Annotated[bool, <typer.models.OptionInfo object at 0x7f6f2071c5d0>]) – Whether to overwrite existing templates in the given directory.

  • wrapper_example (Annotated[int, <typer.models.OptionInfo object at 0x7f6f2071c710>]) – Number of the example to get.

crypto_condor.cli.main.testu01(file, bit_count=0, where=False, filename='', no_save=False)

Tests the output of a PRNG using TestU01.

Parameters:
  • file (Annotated[Path, <typer.models.ArgumentInfo object at 0x7f6f2071c8d0>]) – The name of the file to use.

  • bit_count (Annotated[int, <typer.models.OptionInfo object at 0x7f6f2071c950>]) – The number of bits to test. Must be less or equal to the actual size of the file.

  • where (Annotated[bool, <typer.models.OptionInfo object at 0x7f6f2071ca50>]) – Calls crypto_condor.cli.callbacks.print_testu01_install_dir().

  • filename (Annotated[str, <typer.models.OptionInfo object at 0x7f6f2071cb50>]) – Name of the file to save results.

  • no_save (Annotated[bool, <typer.models.OptionInfo object at 0x7f6f2071cc10>]) – Do not save results or prompt the user.

crypto_condor.cli.main.main(verbose=0, version=False)

Main function.

Parameters:
  • verbose (Annotated[int, <typer.models.OptionInfo object at 0x7f6f2071cdd0>]) – The level of verbosity. Typer counts the number of occurrences of ‘-v’ when using the CLI.

  • version (Annotated[bool, <typer.models.OptionInfo object at 0x7f6f2071ce50>]) – Displays the version and exits. It’s an eager option that uses the print_version() callback.