Beispiel #1
0
 /// <summary>
 /// Inits the entire rcon table
 /// </summary>
 private static void InitRcon()
 {
     rconTable    = new byte[255];
     rconTable[0] = 0x8d;
     for (byte i = 1; i < rconTable.Length; i++)
     {
         rconTable[i] = GF2_8.XTime(rconTable[i - 1]);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Inits the log and the antilog tables.
 /// </summary>
 private static void InitTables()
 {
     antilog[0] = 1;
     for (byte i = 1; i < antilog.Length; i++)
     {
         // next antilog is g*g^(i-1) = g^i
         antilog[i]      = GF2_8.Mul(antilog[i - 1], g);
         log[antilog[i]] = i;
     }
 }