I have sha1sum installed on an Ubuntu 16.04 system and used it like this to compute an sha1 sum:
root@computer:# echo 1234 | sha1sum
1be168ff837f043bde17c0314341c84271047b31 -
also I computed the sum on a file whose only content was the same '1234':
root@computer:# sha1sum /tmp/x
1be168ff837f043bde17c0314341c84271047b31 /tmp/x
and I got the same answer both times. Then I went to a couple of websites that will compute sha1 hashes for you. I went to https://passwordsgenerator.net/sha1-hash-generator/ and input '1234' and got this:
7110EDA4D09E062AA5E4A390B0A572AC0D2C0220
I went to http://www.sha1-online.com and I also got
7110eda4d09e062aa5e4a390b0a572ac0d2c0220
So...how do I explain this discrepancy?