docs: @Override
      public int encode ( byte[] dst, int dstIndex ) {
          int start = this.headerStart = dstIndex;
  
          dstIndex += writeHeaderWireFormat(dst, dstIndex);
          dstIndex += writeAndXWireFormat(dst, dstIndex);
          this.length = dstIndex - start;
  
          if ( this.digest != null ) {
              this.digest.sign(dst, this.headerStart, this.length, this, this.getResponse());
          }
  
          return this.length;
      }