Factor out the code from md5sum and sha1sum into a util function. Use FILE * instead of a file descriptor. This will make it a bit easier/more consistent when we implement support for the -c option.
No support for -c at the moment.