[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: |
Tue, 31 Jan 2023 13:07:47 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Thunderbird/109.0 |
On 31/01/2023 06:07, Jim Meyering wrote:
On Mon, Jan 30, 2023 at 10:17 AM Pádraig Brady <P@draigbrady.com> wrote:
BTW I noted the following possible option when I recently refactored cksum:
--digest_format={int, hex, base64, binary}
/* cksum output formats:
int (sum, and cksum default),
hex (rest default),
b64 (to reduce size),
bin (would auto suppress names? restrict to single argument? */
I'm not sure how --digest-format=int -a sha1 would work.
yes that would be awkward, "int" is probably not worth supporting
Or --digest-format=bin -a sum
That would be the bytes in network byte order.
This would be a separate patch anyway.
If we're just considering base64 with no possibility of a future other encoding
option,
then we can stick with --base64 and --raw to select between base64 and binary.
But doing it that way does provide a way to override a prior --base64 option.
Without that, is a --hex option warranted?
If --hex was warranted then that would tip the balance
in favor of a single --digest-format={base16,base64,binary} option.
I'm 50:50 on whether -b would need to be overridden like that though.
I.e. whether -b would be set as a default in a script or alias.
cheers,
Pádraig
- Re: RFC: cksum --base64/-b support, (continued)
- Re: RFC: cksum --base64/-b support, Jim Meyering, 2023/01/29
- Re: RFC: cksum --base64/-b support, Jim Meyering, 2023/01/30
- Re: RFC: cksum --base64/-b support, Pádraig Brady, 2023/01/30
- Re: RFC: cksum --base64/-b support, Jim Meyering, 2023/01/31
- Re: RFC: cksum --base64/-b support, Pádraig Brady, 2023/01/31
- Re: RFC: cksum --base64/-b support, Jim Meyering, 2023/01/31
- Re: RFC: cksum --base64/-b support, Pádraig Brady, 2023/01/31
- Re: RFC: cksum --base64/-b support, Jim Meyering, 2023/01/31
Re: RFC: cksum --base64/-b support, Pádraig Brady, 2023/01/30