Proper support for binary files

With the encoding option set to `null` binary content becomes properly hashed. Otherwise the hash of binary files will be based on the encoded value of its contents, which is incorrect.

This PR also removes logic in the test file and uses hard coded proper hashes instead. Otherwise if the hash is calculated incorrectly the tests would still show that they passed.

I left the `encoding` option intact, so that people that know what they are doing can use it if they want to. But in normal cases it should be left as `null` by the user.