coreutils
coreutils copied to clipboard
cksum: Unsupported multiple hash encodings in the same file
In a file, several line format may be present at the same time, this is not handled with our implementation.
See:
$ echo -n foo > foo
$ ../gnu/src/cksum --algo=sha224 foo > sum
$ ../gnu/src/cksum --algo=sha224 --base64 foo >> sum
$ cat sum
SHA224 (foo) = 0808f64e60d58979fcb676c96ec938270dea42445aeefcd3a4e6f8db
SHA224 (foo) = CAj2TmDViXn8tnbJbsk4Jw3qQkRa7vzTpOb42w==
$ ../gnu/src/cksum --check sum
foo: OK
foo: OK
$ target/debug/cksum --check sum
foo: OK
../target/debug/cksum: WARNING: 1 line is improperly formatted