Fix #1880: Check the phar checksum if provided

Supports the current set of algorithms from MD5 through SHA512, using ```hash```