public void Corrupt(Be.Windows.Forms.IByteProvider prov, long start, long end) { if (_data.Length > 0) { int data_pos = 0; for (long i = start; i < end; ++i) { prov.WriteByte(i, ApplyOperationToByte(prov.ReadByte(i), _data[data_pos], _op)); data_pos = (data_pos + 1) % _data.Length; } } }
public void Corrupt(Be.Windows.Forms.IByteProvider prov, long start, long end) { for (long i = start; i < end; ++i) { prov.WriteByte(i, CorruptSectionFixedValue.ApplyOperationToByte(prov.ReadByte(i), (byte)_rand.Next(_low_byte, _high_byte), _op)); } }