Beispiel #1
0
        public void Reset(IMemoable other)
        {
            Gost3411Digest t = (Gost3411Digest)other;

            this.sBox = t.sBox;
            cipher.Init(true, new ParametersWithSBox(null, sBox));

            Reset();

            Array.Copy(t.H, 0, this.H, 0, t.H.Length);
            Array.Copy(t.L, 0, this.L, 0, t.L.Length);
            Array.Copy(t.M, 0, this.M, 0, t.M.Length);
            Array.Copy(t.Sum, 0, this.Sum, 0, t.Sum.Length);
            Array.Copy(t.C[1], 0, this.C[1], 0, t.C[1].Length);
            Array.Copy(t.C[2], 0, this.C[2], 0, t.C[2].Length);
            Array.Copy(t.C[3], 0, this.C[3], 0, t.C[3].Length);
            Array.Copy(t.xBuf, 0, this.xBuf, 0, t.xBuf.Length);

            this.xBufOff   = t.xBufOff;
            this.byteCount = t.byteCount;
        }
Beispiel #2
0
 /**
  * Copy constructor.  This will copy the state of the provided
  * message digest.
  */
 public Gost3411Digest(Gost3411Digest t)
 {
     Reset(t);
 }
Beispiel #3
0
		/**
		 * Copy constructor.  This will copy the state of the provided
		 * message digest.
		 */
		public Gost3411Digest(Gost3411Digest t)
		{
			Reset(t);
		}