Skip to content

SHA-256 tests reported as broken #25

@andreasstieger

Description

@andreasstieger

Seems to return incorrect SHA-256 hashes:

[   15s] + /usr/bin/make -O -j12 V=1 VERBOSE=1 check
[...]
[   29s]   FAIL    sha256 Hashing BROKEN
[...]
[   29s]   FAIL    Checking files BROKEN

More specifically:

$ hashrat --version
version: 1.20
$ echo -n "The sky above the port was the color of television, tuned to a dead channel. " | hashrat -sha256
a927bc13323e8ca451f70ec45454b1d2280eeb21de4cf219d070f99b9acc0180
$ echo -n "The sky above the port was the color of television, tuned to a dead channel. " | sha256sum
c7fadad016311a935a56dcdfb585cf5a4781073f7da13afa22177796e566434f  -

Apparently okay for the empty string:

$ echo -n "" | sha256sum
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  -
$ echo -n "" | hashrat -sha256
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

But fails for any non-empty string:

$ echo -n "." | sha256sum
cdb4ee2aea69cc6a83331bbe96dc2caa9a299d21329efb0336fc02a82e1839a8  -
$ echo -n "." | hashrat -sha256
56fac21a490135c35da5c96ce10e767fd0ad74425091e179f58a9605ef2bef44

openSUSE Tumbleweed, x86_64, gcc 14.1.0. Does not happen in gcc 13.2.1.
Also does not happen when using a system libUseful 5.14.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions