///<summary>Decrypts the packet given a SymmetricEncryption returning true
 ///if it was able to decrypt it.</summary>
 public bool Decrypt(SymmetricEncryption se) {
   byte[] decrypted = se.DecryptData(_encrypted_data);
   int pos = 0;
   int data_len = NumberSerializer.ReadInt(decrypted, pos);
   pos += 4;
   _data = MemBlock.Reference(decrypted, pos, data_len);
   pos += data_len;
   _signature = MemBlock.Reference(decrypted, pos, decrypted.Length - pos);
   return true;
 }
 public void TDES()
 {
   SymmetricEncryption enc = new SymmetricEncryption(new TripleDESCryptoServiceProvider());
   for(int i = 1000; i < 1025; i ++) {
     byte[] data = new byte[1010];
     RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
     rng.GetBytes(data);
     byte[] encd = enc.EncryptData(data);
     if(i % 12 == 0) {
       continue;
     }
     byte[] decd = enc.DecryptData(encd);
     MemBlock mdecd = MemBlock.Reference(decd);
     MemBlock mdata = MemBlock.Reference(data);
     Assert.AreEqual(mdecd, mdata, "TDESEncryption: " + i);
   }
 }