Ejemplo n.º 1
0
        public InboundPacket(InboundEncryptedPacket packet, EncryptionKeys keys)
        {
            KeySpace = keys.KeySpace;

            EncryptedPacket = packet;

            Payload = keys.DecryptPayload(packet.UnprotectedHeader, packet.EncryptedPayload.Span, packet.PacketNum);
        }
Ejemplo n.º 2
0
        public IEnumerable <InboundEncryptedPacket> AsPackets()
        {
            var cur = Data;

            while (cur.Length > 0)
            {
                cur = InboundEncryptedPacket.Parse(cur, out var p);
                p.InboundDatagram = this;
                yield return(p);
            }
        }