From c7c965710ed9480f974aa444e68198a152f9b33d Mon Sep 17 00:00:00 2001 From: Danny Date: Thu, 9 Apr 2026 17:38:07 +0200 Subject: [PATCH] even length components and byte length please --- theXORitself.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/theXORitself.py b/theXORitself.py index ce151b6..6b48a40 100644 --- a/theXORitself.py +++ b/theXORitself.py @@ -18,6 +18,15 @@ def main(argv): comp2 = str(arg) elif opt in ("-c3","--comp3"): comp3 = str(arg) + + if len(comp1) != len(comp2) or str(len(comp1)) != str(len(comp3)): + print("All components should be of the same length") + sys.exit(2) + + if len(comp1) not in (16, 32, 64, 128, 256): + print("All components should be of byte length") + sys.exit(2) +