In some embodiments, techniques for document integrity may include detecting an initiator associated with a key, detecting the end of a document, determining that no terminator matching the key has been detected, and rejecting all or part of the document.