be more pedantic in checking the written size of the digest (refs #696)
Merge pull request #698 from reaperhulk/hash-fix

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