1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-08-04 07:43:58 +02:00

doc: add more redirections from legacy *sum to cksum

*  doc/coreutils.texi (md5sum invocation, sha1sum invocation,
b2sum invocation, sha2 utilities): Mention these are legacy interfaces,
and reference 'cksum invocation'.
*  src/cksum.c (usage): Likewise.
*  man/md5sum.x: Redirect to cksum, rather than individual utils.
*  man/sha1sum.x: Likewise.
This commit is contained in:
Pádraig Brady
2026-01-18 13:35:17 +00:00
parent fcaa3a39c7
commit f7bb91968b
4 changed files with 26 additions and 9 deletions
+12 -1
View File
@@ -4203,6 +4203,12 @@ Also file name escaping is not used.
@command{md5sum} computes a 128-bit checksum (or @dfn{fingerprint} or
@dfn{message-digest}) for each specified @var{file}.
@macro legacyDigest
This is a legacy interface to the more modern @command{cksum} utility.
@xref{cksum invocation}.
@end macro
@legacyDigest
@macro weakHash{hash}
The \hash\ digest is more reliable than a simple CRC (provided by
the @command{cksum} command) for detecting accidental file corruption,
@@ -4214,7 +4220,6 @@ to modify certain files, including digital certificates, so that they
appear valid when signed with an \hash\ digest. For more secure hashes,
consider using @samp{sha2}, @samp{sha3}, or @samp{blake2b},
available through the @command{cksum} @option{--algorithm} option.
@xref{cksum invocation}.
@end macro
@weakHash{MD5}
@@ -4251,6 +4256,8 @@ The program accepts @ref{cksum common options}. Also see @ref{Common options}.
@command{b2sum} computes a 512-bit checksum for each specified
@var{file}.
@legacyDigest
@checksumUsage{b2sum}
In addition @command{b2sum} supports the following options.
@@ -4282,6 +4289,8 @@ as the length is automatically determined when checking.
@command{sha1sum} computes a 160-bit checksum for each specified @var{file}.
@legacyDigest
@weakHash{SHA-1}
@checksumUsage{sha1sum}
@@ -4289,6 +4298,8 @@ as the length is automatically determined when checking.
@node sha2 utilities
@section sha2 utilities: Print or check SHA-2 digests
@legacyDigest
@pindex sha224sum
@pindex sha256sum
@pindex sha384sum
+2 -3
View File
@@ -4,8 +4,7 @@ md5sum \- compute and check MD5 message digest
.\" Add any additional description here
[BUGS]
Do not use the MD5 algorithm for security related purposes.
Instead, use an SHA\-2 algorithm, implemented in the programs
sha224sum(1), sha256sum(1), sha384sum(1), sha512sum(1),
or the BLAKE2 algorithm, implemented in b2sum(1)
Instead, use an SHA\-2, SHA\-3, or BLAKE2 algorithm,
implemented in the cksum(1) program.
[SEE ALSO]
cksum(1)
+3 -4
View File
@@ -3,9 +3,8 @@ sha1sum \- compute and check SHA1 message digest
[DESCRIPTION]
.\" Add any additional description here
[BUGS]
Do not use the SHA-1 algorithm for security related purposes.
Instead, use an SHA\-2 algorithm, implemented in the programs
sha224sum(1), sha256sum(1), sha384sum(1), sha512sum(1),
or the BLAKE2 algorithm, implemented in b2sum(1)
Do not use the MD5 algorithm for security related purposes.
Instead, use an SHA\-2, SHA\-3, or BLAKE2 algorithm,
implemented in the cksum(1) program.
[SEE ALSO]
cksum(1)
+9 -1
View File
@@ -487,9 +487,14 @@ Usage: %s [OPTION]... [FILE]...\n\
"), program_name);
#if HASH_ALGO_CKSUM
if (legacy_mode)
printf (_("\
{
printf (_("\
Print or check %s checksums.\n\
"), DIGEST_TYPE_STRING);
fputs (_("\
Legacy interface to the cksum utility.\n\
"), stdout);
}
else
fputs (_("\
Print or verify checksums.\n\
@@ -501,6 +506,9 @@ Print or check %s (%d-bit) checksums.\n\
"),
DIGEST_TYPE_STRING,
DIGEST_BITS);
fputs (_("\
Legacy interface to the cksum utility.\n\
"), stdout);
#endif
emit_stdin_note ();