#1936: SHA256 sums don't seem to match with external tools.
------------------------+---------------------------------------------------
Reporter: DavidCzech | Type: bug
Status: new | Priority: normal
Milestone: | Component: none
Version: 2.11.0 | Severity: medium
Keywords: | Lang:
Patch: | Platform:
------------------------+---------------------------------------------------
Not sure if the SHA256 implementation is broken, or if I'm doing it wrong,
but they don't seem to match up with my system's sha256sum tool, nor other
external services to generate sha265 hashes.
Attached are a simple example in PIR which should output the sha256 of
"blah" (8b7df143d91c716ecfa5fc1730022f6b421b05cedee8fd52b1fc65a96030ad52
according to various sources, shown below), and an file containing "blah"
to use sha256sum on. The test program doesn't output the right hash:
{{{
da...@animal:~/Data/GCI/kapace-parrot$ ./parrot test_sha.pir
61a19cfc37762ce0c099bf37d86159501986a1ff3ea31e8c29412a29d0e4181cda...@animal:~/Data/GCI
/kapace-parrot$
}}}
Online calculators and sources for checking:
http://www.xorbin.com/tools/sha256-hash-calculator (type in "blah")
- 8b7df143d91c716ecfa5fc1730022f6b421b05cedee8fd52b1fc65a96030ad52
http://www.fileformat.info/tool/hash.htm?text=blah
- 8b7df143d91c716ecfa5fc1730022f6b421b05cedee8fd52b1fc65a96030ad52
And here is a test using my system's sha256sum tool on the sample file.
{{{
da...@animal:~$ cat asdf # No newline at the end...
blahda...@animal:~$ sha256sum asdf
8b7df143d91c716ecfa5fc1730022f6b421b05cedee8fd52b1fc65a96030ad52 asdf
da...@animal:~$
}}}
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1936>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets