Be more pedantic in checking the written size of the hash digest

refs #696