aboutsummaryrefslogtreecommitdiffhomepage
path: root/pyecsca/codegen/common.py
diff options
context:
space:
mode:
authorJ08nY2023-01-29 22:24:25 +0100
committerJ08nY2023-01-29 22:24:25 +0100
commite52dd224e63425136fe112cb6c6b7c3b576d1ee4 (patch)
tree6135fba9f7486bc60988cd66cf15ebc2e3bea596 /pyecsca/codegen/common.py
parent8c76e9b40a020c6afbb31f3d4fcb80494bbd7448 (diff)
downloadpyecsca-codegen-e52dd224e63425136fe112cb6c6b7c3b576d1ee4.tar.gz
pyecsca-codegen-e52dd224e63425136fe112cb6c6b7c3b576d1ee4.tar.zst
pyecsca-codegen-e52dd224e63425136fe112cb6c6b7c3b576d1ee4.zip
Miscellaneous docs.
Diffstat (limited to 'pyecsca/codegen/common.py')
-rw-r--r--pyecsca/codegen/common.py4
1 files changed, 4 insertions, 0 deletions
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)