]> git.ipfire.org Git - thirdparty/coreutils.git/commit
cksum: add support for --algorithm=crc32b
authorPádraig Brady <P@draigBrady.com>
Fri, 1 Nov 2024 15:11:55 +0000 (15:11 +0000)
committerPádraig Brady <P@draigBrady.com>
Sat, 2 Nov 2024 19:57:35 +0000 (19:57 +0000)
commita94929715c1c111cfab3b9f9875307aba59094d8
treeed4066aeec51b5986d9b829cf2226f81ee3dfdd1
parentee231019e185732780c72b46616db64a836f50f0
cksum: add support for --algorithm=crc32b

  $ echo -n '123456789' | cksum --raw -a crc32b | basenc --base16
  CBF43926

* bootstrap.conf: Explicitly depend on the crc module.
* doc/coreutils.texi (cksum): Add "crc32b" as an argument to -a.
* src/cksum.c (crc32b_sum_stream): A new function similar to
crc_sum_stream, but which does not include the length in
the CRC calculation.
* src/cksum.h: Add crc32b_sum_stream prototype.
* src/digest.c: Add "crc32b" as an argument to -a.
* tests/cksum/cksum.sh: Refactor to test both crc and crc32b.
* tests/cksum/cksum-a.sh: Add "crc32b" case.
* tests/cksum/cksum-base64.pl: Likewise.
* tests/misc/read-errors.sh: Likewise.
* NEWS: Mention the new feature.
NEWS
bootstrap.conf
doc/coreutils.texi
src/cksum.c
src/cksum.h
src/digest.c
tests/cksum/cksum-a.sh
tests/cksum/cksum-base64.pl
tests/cksum/cksum.sh
tests/misc/read-errors.sh