/// <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)); }
/// <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; }
/// <summary> /// Constructor. /// </summary> /// <param name="byteIndexProvider">Byte rule to apply.</param> protected ProcessorBase(ByteIndexProviderBase byteIndexProvider) { _byteIndexProvider = byteIndexProvider; }
/// <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()) { }
/// <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) { }