Ejemplo n.º 1
0
 public static void DecryptBuffer(byte[] buff, int length, long position)
 {
     if (position == 0L && length > 3)
     {
         VideoEncryption.XorBuffer(buff, length, position);
         if (buff[0] == (byte)0 && buff[1] == (byte)0 && buff[2] == (byte)0)
         {
             VideoEncryption.useV1 = true;
         }
         else
         {
             VideoEncryption.XorBuffer(buff, length, position);
             VideoEncryption.XorBufferV2(buff, length, position);
             if (buff[0] == (byte)0 && buff[1] == (byte)0)
             {
                 int num = (int)buff[2];
             }
             VideoEncryption.useV1 = false;
         }
     }
     else if (VideoEncryption.useV1)
     {
         VideoEncryption.XorBuffer(buff, length, position);
     }
     else
     {
         VideoEncryption.XorBufferV2(buff, length, position);
     }
 }
Ejemplo n.º 2
0
 public static void EncryptBuffer(byte[] buff, int length, long position)
 {
     VideoEncryption.XorBufferV2(buff, length, position);
 }