/** Copy constructor. This will copy the state of the provided message digest. */
  public GOST3411Digest(GOST3411Digest t) {
    cipher.init(true, new ParametersWithSBox(null, GOST28147Engine.getSBox("D-A")));

    reset();

    System.arraycopy(t.H, 0, this.H, 0, t.H.length);
    System.arraycopy(t.L, 0, this.L, 0, t.L.length);
    System.arraycopy(t.M, 0, this.M, 0, t.M.length);
    System.arraycopy(t.Sum, 0, this.Sum, 0, t.Sum.length);
    System.arraycopy(t.C[1], 0, this.C[1], 0, t.C[1].length);
    System.arraycopy(t.C[2], 0, this.C[2], 0, t.C[2].length);
    System.arraycopy(t.C[3], 0, this.C[3], 0, t.C[3].length);
    System.arraycopy(t.xBuf, 0, this.xBuf, 0, t.xBuf.length);

    this.xBufOff = t.xBufOff;
    this.byteCount = t.byteCount;
  }
  /** Standard constructor */
  public GOST3411Digest() {
    cipher.init(true, new ParametersWithSBox(null, GOST28147Engine.getSBox("D-A")));

    reset();
  }