code: public void restoreState() {
      h0=s0;
      h1=s1;
      h2=s2;
      h3=s3;
      h4=s4;
      
      length = saveLength;
      
      finalBuffer.clear();
      finalBuffer.put(saveBuffer);
    }
docs: Restore the digest to its previously-saved state.