changeset 233:5f4c81313be7

Assert that the generated password has the required (output) length
author Franz Glasner <fzglas.hg@dom66.de>
date Fri, 07 Feb 2025 13:42:03 +0100
parents 7ac8a2537bc9
children c7dc57c44e8b
files cutils/genpwd.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/cutils/genpwd.py	Fri Feb 07 13:38:06 2025 +0100
+++ b/cutils/genpwd.py	Fri Feb 07 13:42:03 2025 +0100
@@ -76,6 +76,7 @@
     else:
         raise NotImplementedError("type not yet implemented: %s"
                                   % opts.repertoire)
+    assert len(pwd) == opts.req_length
     print(pwd)