Also add the sha512 and sha512file template functions.
We also add tests to test.pl to check that we exit with an error when sha256sum or sha512sum is wrong (and that we don't when it's the expected one).
test.pl
Tested by running ./test.pl.
./test.pl
#40077 (closed)
/cc @pierov