Skip to content

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

@RenjiSann

Description

@RenjiSann

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions