Re: [PATCH V2] Add support for cksum --algorithm [sm3]

2021-09-14 Thread Jim Meyering
On Tue, Sep 14, 2021 at 5:36 AM Pádraig Brady wrote: > On 12/09/2021 23:01, Pádraig Brady wrote: > > On 12/09/2021 19:13, Pádraig Brady wrote: > >> This patch set refactors all digest implementations > >> to their own modules, all interfaced through digest.c. > >> All file operations and diagnosti

Re: [PATCH 07/12] cksum: add --algorithm option to select digest mode

2021-09-14 Thread Pádraig Brady
On 12/09/2021 19:14, Pádraig Brady wrote: @@ -260,10 +366,10 @@ enum static struct option const long_options[] = { -#if HASH_ALGO_BLAKE2 +#if HASH_ALGO_BLAKE2 || HASH_ALSO_CKSUM { "length", required_argument, NULL, 'l'}, #endif s/ALSO/ALGO/ :)

Re: [PATCH V2] Add support for cksum --algorithm [sm3]

2021-09-14 Thread Pádraig Brady
On 12/09/2021 23:01, Pádraig Brady wrote: On 12/09/2021 19:13, Pádraig Brady wrote: This patch set refactors all digest implementations to their own modules, all interfaced through digest.c. All file operations and diagnostics are done in digest.c. All digests are made available through `cksum -

Re: [PATCH 10/12] cksum: support digest detection for tagged format

2021-09-14 Thread Pádraig Brady
On 12/09/2021 19:14, Pádraig Brady wrote: > @@ -652,6 +692,21 @@ split_3 (char *s, size_t s_len, > > /* Check for BSD-style checksum line. */ > > +#if HASH_ALGO_CKSUM > + if (! algorithm_specified) > +{ > + ptrdiff_t algo_tag = algorithm_from_tag (s); The above should be s+i to hand