Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cksum: Unsupported multiple hash encodings in the same file #6653

Closed
RenjiSann opened this issue Aug 17, 2024 · 0 comments · Fixed by #6929
Closed

cksum: Unsupported multiple hash encodings in the same file #6653

RenjiSann opened this issue Aug 17, 2024 · 0 comments · Fixed by #6929

Comments

@RenjiSann
Copy link
Collaborator

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants