Пример #1
0
        private void CallAkamaiDecryptionService(List <Tag> ts)
        {
            StringBuilder datas = new StringBuilder();
            StringBuilder keys  = new StringBuilder();
            int           cnt   = 0;

            foreach (Tag t in ts)
            {
                if (cnt > 0)
                {
                    datas.Append(",");
                    keys.Append(",");
                }

                if (t.NeedDecryption)
                {
                    datas.Append(Convert.ToBase64String(t.Packet));
                    keys.Append(Convert.ToBase64String(t.Key));
                    cnt++;
                }
            }
            if (datas.Length > 0)
            {
                string   result = DecryptForm.Decrypt(datas.ToString(), keys.ToString());
                string[] splits = result.Split(',');
                cnt = 0;
                foreach (Tag t in ts)
                {
                    if (t.NeedDecryption)
                    {
                        t.NeedDecryption = false;
                        t.Packet         = Convert.FromBase64String(splits[cnt]);
                        t.PacketSize     = t.Packet.Length;
                        t.TotalSize      = t.PacketSize + 11;
                        cnt++;
                    }
                }
            }
        }
Пример #2
0
 public void Exit()
 {
     DecryptForm.Kill();
 }
Пример #3
0
 public DownloadPluginInfo Information()
 {
     DecryptForm.Init();
     return(_info);
 }