Move message checksum to its own function

So it can be overwritten by individual instances if necessary to replace the SHA256(SHA256(data)) default.