calculate the checksum of a file (MD2, MD5, SHA1, SHA256, SHA384, SHA512)