|
|
|
|
|
by natch
1033 days ago
|
|
They have a common beginner's mistake in their example usage of sha256sum. Nothing that would affect the git usage, to be fair... unless they have related tooling that does this. > echo "please hash this data" | sha256sum
f2ccc47bcb79799071eab33aa4311e6764769681bb9052ae444cb6e2d87427c8 -
This sum is not the sum of "please hash this data" but instead it is the sum of "please hash this data\n" where "\n" represents not a literal backslash and n, but a newline character. The unwanted newline is supplied by the echo command, obviously.The proper way to have done this example (edit: on BSD, macOS, etc.) would be: > echo -n "please hash this data" | sha256sum
62f73749b40cc70f453320e1ffc37e405ba50474b5db68ad436e64b61fbb8cf0 -
And then we would see the actual sha256sum for the example data used.Edit: Forget this, an even better way is posted by others below! Thanks! |
|