Example #1
0
 protected DataStream Write(DataStream ds)// Сериализация пакета, генерация ключей
 {
     if (ds is LogginAnnounce)
     {
         ((LogginAnnounce)ds).GenHash(md5);
     }
     if (ds is CMKeyC02)
     {
         CMKeyC02 key = (CMKeyC02)ds;
         Crypt.CreateEnc(md5.GetKey(key.ServerKey));
         Crypt.CreateDec(md5.GetKey(key.ClientKey));
     }
     return(Serializer.Serialize(ds));
 }