Esempio n. 1
0
        /**
         * Creates a RadiusPacket from a received datagram packet.
         * @param packet received datagram
         * @param request Radius request packet
         * @return RadiusPacket object
         */

        protected RadiusPacket MakeRadiusPacket(byte[] data, RadiusPacket request)
        {
            var memoryStream = new MemoryStream(data);

            try
            {
                return(RadiusPacket.DecodeResponsePacket(memoryStream, SharedSecret, request));
            }
            finally
            {
                memoryStream.Dispose();
            }
        }