Esempio n. 1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="byteRule">Byte rule to apply.</param>
 /// <param name="byteProvider">Provider of bytes.</param>
 /// <param name="operation">Mathematical operation to perform.</param>
 /// <param name="wrapAround">If true, wraps the calculated byte if needed.</param>
 public MathProcessor(ByteIndexProviderBase byteRule, IByteProvider byteProvider, Operation operation, bool wrapAround)
     : base(byteRule, byteProvider)
 {
     OperationToPerform = operation;
     WrapAround         = wrapAround;
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="byteIndexProvider">Provider of byte indexes..</param>
 /// <param name="byteProvider">Provider of bytes to use.</param>
 public ByteProvidedProcessorBase(ByteIndexProviderBase byteIndexProvider, IByteProvider byteProvider)
     : base(byteIndexProvider)
 {
     ByteProvider = byteProvider ?? throw new ArgumentNullException(nameof(byteProvider));
 }
Esempio n. 3
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="byteIndexProvider">Provider of byte indexes.</param>
 /// <param name="byteProvider">Provider of byte values.</param>
 /// <param name="direction">Direction to shift the bits.</param>
 public BitShiftProcessor(ByteIndexProviderBase byteIndexProvider, IByteProvider byteProvider, ShiftDirection direction)
   : base(byteIndexProvider, byteProvider)
 {
   Direction = direction;
 }
Esempio n. 4
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="byteIndexProvider">Byte rule to apply.</param>
 protected ProcessorBase(ByteIndexProviderBase byteIndexProvider)
 {
     _byteIndexProvider = byteIndexProvider;
 }
Esempio n. 5
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="byteIndexProvider">Provider of the indexes of
 /// the bytes to glitch.</param>
 public ShuffleProcessor(ByteIndexProviderBase byteIndexProvider)
     : this(byteIndexProvider, DateTime.Now.Ticks.GetHashCode())
 {
 }
Esempio n. 6
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="byteIndexProvider">Provider of the indexes of
 /// the bytes to glitch.</param>
 /// <param name="seed">Seed for random number generation.</param>
 public ShuffleProcessor(ByteIndexProviderBase byteIndexProvider, int seed)
     : base(byteIndexProvider)
 {
     Seed = seed;
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="byteRule">Byte rule to apply.</param>
 /// <param name="byteProvider">Provider of bytes.</param>
 public ReplaceProcessor(ByteIndexProviderBase byteRule, IByteProvider byteProvider)
     : base(byteRule, byteProvider)
 {
 }