CSharpRTMP.Core.Protocols.Rtmfp.RtmfpUtils.Decode C# (CSharp) Метод

Decode() публичный статический Метод

public static Decode ( AESEngine aesDecrypt, N2HBinaryReader packet ) : bool
aesDecrypt AESEngine
packet CSharpRTMP.Common.N2HBinaryReader
Результат bool
        public static bool Decode(AESEngine aesDecrypt,N2HBinaryReader packet)
        {
            //var pos = packet.BaseStream.Position;
            //var buffer = packet.ReadBytes((int) packet.BaseStream.GetAvaliableByteCounts());
	// Decrypt
           // packet.BaseStream.Position = pos;
            aesDecrypt.Process(packet.BaseStream as MemoryStream);
            //packet.BaseStream.Write(buffer,0,buffer.Length);
	        return ReadCRC(packet);
        }
        public static bool ReadCRC(N2HBinaryReader packet)

Usage Example

Пример #1
0
        public virtual void Decode(N2HBinaryReader reader)
        {
            var type = FarId == 0 ? AESEngine.AESType.SYMMETRIC : AESEngine.AESType.DEFAULT;

            RtmfpUtils.Decode(AesDecrypt.Next(type), reader);
            PrevAesType = type;
        }