coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: cksum --base64/-b support


From: Pádraig Brady
Subject: Re: RFC: cksum --base64/-b support
Date: Mon, 30 Jan 2023 19:29:04 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Thunderbird/109.0

On 30/01/2023 17:52, Jim Meyering wrote:
On Sun, Jan 29, 2023 at 1:10 PM Jim Meyering <jim@meyering.net> wrote:
On Sun, Jan 29, 2023 at 12:40 PM Jim Meyering <jim@meyering.net> wrote:
...
- I'm inclined to work like the openbsd cksum and accept invocations
like "cksum -a sha1x" and "cksum -a sha1b". Any objection?

Actually, I am now **disinclined** to implement this part. It'd make
sense only if we were able to compute multiple checksums in a single
invocation.
Allowing that would require a fundamental redesign, which feels out of
scope, at least initially.

Here's a proposed patch for that.

"If must be followed by white space." comment has a typo
and also not enforced explicitly, so could be removed.

valid_digits() may check beyond the end of the buffer
in the case len != BASE64_LENGTH.
Perhaps change the "else" to "else if (len == digest_hex_bytes)".
Similarly it may be more defensive / efficient to pass
digest_len out of split_3().

non padded base64 encodings are not supported.
Is that OK. Worth mentioning in texinfo if so.
A non padded negative test in cksum-c.sh would be useful.

thanks!
Pádraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]