diff --git a/aid_generator.py b/aid_generator.py index 03913b0..614654f 100644 --- a/aid_generator.py +++ b/aid_generator.py @@ -84,10 +84,9 @@ def main(options: dict[str, Any]) -> None: len(options.get("", "")) > 0 and len(options.get("", [])) > 0 ): - ic_uuid: uuid.UUID = uuid.uuid5( - NAMESPACE_INFINEON, str(options[""]) + uuid_hash.update( + uuid.uuid5(NAMESPACE_INFINEON, str(options[""])).bytes ) - uuid_hash.update(ic_uuid.bytes) for domain in list(options[""]): uuid_hash.update(uuid.uuid5(uuid.NAMESPACE_DNS, str(domain)).bytes) @@ -96,6 +95,6 @@ def main(options: dict[str, Any]) -> None: aid_result = f"{AID_PREFIX}{MANUFACTURER_ID}{uuid_result.hex[:8]}{AID_POSTFIX}" print(f"Your AID is: {aid_result}") + if __name__ == "__main__": - arguments: dict[str, Any] = docopt(__doc__, version="2023.08.1") - main(arguments) + main(docopt(__doc__, version="2023.08.1"))