I know this is really old, but here's why it didn't work and what to do about it:
At startup
echo -n "hello" | sha1sum
as in your example, you get
aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d -
Note the "-" at the end.
The hash in front is the correct hash of the hash to greet, but the trait will interfere with the hash.
To get only the first part, you can do this:
echo -n "hello" | sha1sum | awk '{print $1}'
This will pass your output through awk and give you only the 1st column. Result: correct sha1 for "hello"
aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
Hope this helps someone.
source share