Exemple #1
0
 public StopAndGoGenerator()
 {
     Lfsr[] lfsrs = new Lfsr[NumberOfRegisters];
     for (int i = 0; i < lfsrs.Length; i++)
     {
         lfsrs[i] = new Lfsr();
     }
     Registers = lfsrs;
 }
Exemple #2
0
 //Generates registers with default length (8)
 public GeffesGenerator()
 {
     Lfsr[] lfsr = new Lfsr[3];
     for (int i = 0; i < lfsr.Length; i++)
     {
         lfsr[i] = new Lfsr();
     }
     Registers = lfsr;
 }
 public ShrinkingGenerator()
 {
     Lfsr[] lfsr = new Lfsr[2];
     for (int i = 0; i < lfsr.Length; i++)
     {
         lfsr[i] = new Lfsr();
     }
     Registers = lfsr;
 }
Exemple #4
0
        public CascadeGenerator(int numOfLfsr)
        {
            Lfsr[] lfsr = new Lfsr[numOfLfsr];
            for (int i = 0; i < lfsr.Length; i++)
            {
                lfsr[i] = new Lfsr();
            }

            Registers = lfsr;
        }
 public void ChangeRegister(Lfsr register, int registerIndex)
 {
     if (registerIndex > Registers.Length - 1)
     {
         throw new ArgumentException("Niepoprawny indeks rejestru!");
     }
     else
     {
         Registers[registerIndex] = register;
     }
     Registers[registerIndex].UpdateOutputBit();
 }
Exemple #6
0
 public SelfShrinkingGenerator()
 {
     Registers = new Lfsr[1] {
         new Lfsr()
     };
 }
Exemple #7
0
 public SelfDecimationGenerator()
 {
     Registers = new Lfsr[1] {
         new Lfsr()
     };
 }