Mercurial > hgrepos > Python > apps > py-cutils
changeset 86:fd1cfd1b0f9d
Make "blake2" an alias of "blake2b"
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 20 Apr 2022 23:20:24 +0200 |
| parents | d445534b80bb |
| children | b46673c42894 |
| files | cutils/shasum.py |
| diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/cutils/shasum.py Wed Apr 20 23:15:55 2022 +0200 +++ b/cutils/shasum.py Wed Apr 20 23:20:24 2022 +0200 @@ -55,7 +55,7 @@ fromfile_prefix_chars='@') aparser.add_argument( "--algorithm", "-a", action="store", type=argv2algo, - help="1 (default), 224, 256, 384, 512, 3-224, 3-256, 3-384, 3-512, blake2b, blake2s, md5") + help="1 (default), 224, 256, 384, 512, 3-224, 3-256, 3-384, 3-512, blake2b, blake2s, blake2, md5") aparser.add_argument( "--base64", action="store_true", help="Output checksums in base64 notation, not hexadecimal (OpenBSD).") @@ -420,7 +420,7 @@ return (hashlib.sha3_384, "SHA3-384") elif s in ("3-512", "sha3-512"): return (hashlib.sha3_512, "SHA3-512") - elif s in ("blake2b", "blake2b-512"): + elif s in ("blake2b", "blake2b-512", "blake2", "blake2-512"): return (get_blake2b(), "BLAKE2b") elif s in ("blake2s", "blake2s-256"): return (get_blake2s(), "BLAKE2s")
