Modify sha256 always to pass bytes in python3

The same as the previous patch.

Also this patch monkeypatches hashlib.  This code should probably
be pulled and put elsewhere, but I don't know where else is good.