# HG changeset patch # User Franz Glasner # Date 1735494383 -3600 # Node ID a548783381b6ba88eafe044af87b6a8e1b0686f1 # Parent dd4fe912d7e9ed2c94a321c89d663079f149bba5 More accurate description of --algorithm. While their: alias "3" to "3-512" (sha3-512). diff -r dd4fe912d7e9 -r a548783381b6 cutils/shasum.py --- a/cutils/shasum.py Sun Dec 29 18:34:22 2024 +0100 +++ b/cutils/shasum.py Sun Dec 29 18:46:23 2024 +0100 @@ -38,7 +38,7 @@ fromfile_prefix_chars='@') aparser.add_argument( "--algorithm", "-a", action="store", type=util.argv2algo, - help="1 (default), 224, 256, 384, 512, 3-224, 3-256, 3-384, 3-512, blake2b, blake2s, blake2, blake2-256, md5") + help="1 (default, aka sha1), 224, 256, 384, 512, 3 (alias for sha3-512), 3-224, 3-256, 3-384, 3-512, blake2b, blake2b-256, blake2s, blake2 (alias for blake2b), blake2-256 (alias for blake2b-256), md5") aparser.add_argument( "--base64", action="store_true", help="Output checksums in base64 notation, not hexadecimal (OpenBSD).") diff -r dd4fe912d7e9 -r a548783381b6 cutils/util/__init__.py --- a/cutils/util/__init__.py Sun Dec 29 18:34:22 2024 +0100 +++ b/cutils/util/__init__.py Sun Dec 29 18:46:23 2024 +0100 @@ -86,7 +86,7 @@ return (hashlib.sha3_256, "SHA3-256") elif s in ("3-384", "sha3-384"): return (hashlib.sha3_384, "SHA3-384") - elif s in ("3-512", "sha3-512"): + elif s in ("3", "3-512", "sha3-512"): return (hashlib.sha3_512, "SHA3-512") elif s in ("blake2b", "blake2b-512", "blake2", "blake2-512"): return (get_blake2b(), "BLAKE2b")