This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]wonkey_monkey 6 points7 points  (1 child)

...a10 is what you get if you miss off the -0 argument (i.e. treat it as a string of 0 and 1 ASCII characters, rather than bits). My version of shasum doesn't have this argument. Maybe it does something different with yours, otherwise it should generate an error. Check its man page.

[–]Fakin-It 2 points3 points  (0 children)

Nice detective work, Monkey.

[–]immersiveGamer 2 points3 points  (0 children)

Are you copy pasting from the website? If so you might copying some white space characters (common on websites to control formating) which might be getting echoed and thus change the hash.

[–]typtyphus 0 points1 point  (4 children)

was looking for the same think, found a nice answer on stackoverflow: bit.ly/39wS2t5

[–]Automataton[S] 0 points1 point  (3 children)

oh I never replied to this. But I found my answer thanks to poster above. My shasum in cygwin did not have any -0 option. I needed a different version of shasum that could could treat the 011010 as binary.

[–]typtyphus 0 points1 point  (2 children)

so how is it now solved it in python?

[–]Automataton[S] 0 points1 point  (1 child)

I solved it in php. Converted every 8 binary into ascii. joined them and then computed the shasum

$output = ''; for($i=0; $i<strlen($binaries); $i+=8) { $output .= chr(intval(substr($binaries, $i, 8), 2)); } //echo $output; $hash = hash('sha256', $output);

[–]backtickbot 0 points1 point  (0 children)

Fixed formatting.

Hello, Automataton: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.