From e52dd224e63425136fe112cb6c6b7c3b576d1ee4 Mon Sep 17 00:00:00 2001 From: J08nY Date: Sun, 29 Jan 2023 22:24:25 +0100 Subject: Miscellaneous docs. --- pyecsca/codegen/common.py | 4 ++++ pyecsca/codegen/fat.h | 3 +++ 2 files changed, 7 insertions(+) (limited to 'pyecsca/codegen') diff --git a/pyecsca/codegen/common.py b/pyecsca/codegen/common.py index d180780..56ca261 100644 --- a/pyecsca/codegen/common.py +++ b/pyecsca/codegen/common.py @@ -25,6 +25,8 @@ class Platform(EnumDefine): @public @dataclass(frozen=True) class DeviceConfiguration(Configuration): + """A device configuration that includes the platform and choices + specific to the pyecsca-codegened implementations.""" platform: Platform keygen: bool ecdh: bool @@ -81,6 +83,7 @@ def wrap_enum(enum_class: Type[EnumDefine]): def get_model(ctx: click.Context, param, value: str) -> CurveModel: + """A click callback func for model setup.""" if value is None: return None classes = { @@ -96,6 +99,7 @@ def get_model(ctx: click.Context, param, value: str) -> CurveModel: def get_coords(ctx: click.Context, param, value: Optional[str]) -> Optional[CoordinateModel]: + """A click callback func for coordinate setup.""" if value is None: return None ctx.ensure_object(dict) diff --git a/pyecsca/codegen/fat.h b/pyecsca/codegen/fat.h index 0032c91..9fb6051 100644 --- a/pyecsca/codegen/fat.h +++ b/pyecsca/codegen/fat.h @@ -3,6 +3,9 @@ #include +/** + * A fat pointer type that knows its own length. + */ typedef struct { uint32_t len; void *value; -- cgit v1.3.1