public void Reset(IMemoable other) { WhirlpoolDigest originalDigest = (WhirlpoolDigest)other; Array.Copy(originalDigest._rc, 0, _rc, 0, _rc.Length); Array.Copy(originalDigest._buffer, 0, _buffer, 0, _buffer.Length); this._bufferPos = originalDigest._bufferPos; Array.Copy(originalDigest._bitCount, 0, _bitCount, 0, _bitCount.Length); // -- internal hash state -- Array.Copy(originalDigest._hash, 0, _hash, 0, _hash.Length); Array.Copy(originalDigest._K, 0, _K, 0, _K.Length); Array.Copy(originalDigest._L, 0, _L, 0, _L.Length); Array.Copy(originalDigest._block, 0, _block, 0, _block.Length); Array.Copy(originalDigest._state, 0, _state, 0, _state.Length); }
private long[] _state = new long[8]; // the current "cipher" state /** * Copy constructor. This will copy the state of the provided message * digest. */ public WhirlpoolDigest(WhirlpoolDigest originalDigest) { Reset(originalDigest); }