Exemple #1
0
        private Packet ReadLine(StreamReader src, EncryptionProvider decryptor, out int finalSize)
        {
            string read = src.ReadLine();

            if (read == null)
            {
                throw new NullReferenceException("Read null from StreamReader");
            }
            finalSize = read.Length;
            byte[] data = Convert.FromBase64String(read);
            data = decryptor.DecryptArray(data);
            return(ToySerializer.Deserialize <Packet>(data));
        }