Add tests for incorrect digests in Message.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Refactor out Message digest handling.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>