When I go online and calculate a hash from a string on some generator website, no matter the algorithm or the website, it is always a different output than if I do
echo "password" | sha256sum (or insert *sum there for corresponding algorithm). What is the difference between the two?
Very possibly, the newline.
Try this instead:
$ echo -n "password" | sha256sum
The -n argument to echo tells it not to print a newline.
As you can see, this changes the hash:
$ echo "password" | sha256sum 6b3a55e0261b0304143f805a24924d0c1c44524821305f31d9277843b8a10f4e - $ echo -n "password" | sha256sum 5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8 - $