private void digestPart() {
        if ( byteOffset >= MB ) {
            byteOffset = 0;
            checksums.add(digestInputStream.getMessageDigest().digest());
            digestInputStream.getMessageDigest().reset();
        }
    }
Digests the current part of the message, if necessary, and resets digest
state.
aws-java-sdk-glacier/src/main/java/com/amazonaws/services/glacier/internal/TreeHashInputStream.java