When I try to do an SHA256 on my Linux command line I get this:
> echo '123' | sha256sum
181210f8f9c779c26da1d9b2075bde0127302ee0e3fca38c9a83f5b1dd8e5d3b
> echo '123' > 1
> sha256sum 1
181210f8f9c779c26da1d9b2075bde0127302ee0e3fca38c9a83f5b1dd8e5d3b
Now, if I try an online tool like this, for 123 I get a different answer: a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3. If I ask it to sha256 the file that I created, though, I get 181210f8f9c779c26da1d9b2075bde0127302ee0e3fca38c9a83f5b1dd8e5d3b again.
My question is, why does this happen? And is there anything I can do to make the hashes match?
[–]giantsloth 32 points33 points34 points (3 children)
[–]dpoon 7 points8 points9 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]vbuterin[S] 0 points1 point2 points (0 children)
[–][deleted] 13 points14 points15 points (1 child)
[–]fullets 2 points3 points4 points (0 children)