public void TestAccountingPacketRequestAuthenticatorFail()
        {
            var packetBytes = "0404002711019c27d4e00cbc523b3e2fc834baf401066e656d6f2806000000012c073230303234";
            var secret      = "foo";

            var requestAuthenticator = RadiusPacket.CalculateRequestAuthenticator(Encoding.UTF8.GetBytes(secret), Utils.StringToByteArray(packetBytes));

            Assert.That(() => RadiusPacket.Parse(Utils.StringToByteArray(packetBytes), GetDictionary(), Encoding.UTF8.GetBytes(secret)),
                        Throws.TypeOf <InvalidOperationException>());
        }
        public void TestAccountingPacketRequestAuthenticatorSuccess()
        {
            var packetBytes = "0404002711019c27d4e00cbc523b3e2fc834baf401066e656d6f2806000000012c073230303234";
            var secret      = "xyzzy5461";

            var requestAuthenticator = RadiusPacket.CalculateRequestAuthenticator(Encoding.UTF8.GetBytes(secret), Utils.StringToByteArray(packetBytes));
            var packet = RadiusPacket.Parse(Utils.StringToByteArray(packetBytes), GetDictionary(), Encoding.UTF8.GetBytes(secret));

            Assert.AreEqual(packet.Authenticator.ToHexString(), requestAuthenticator.ToHexString());
        }