예제 #1
0
 /// <summary>
 /// Verifies that the packet's <see cref="Authenticator"/> is a valid response authenticator.
 /// </summary>
 /// <param name="requestPacket">The RADIUS request packet to this response.</param>
 /// <param name="sharedSecret">The shared RADIUS secret.</param>
 /// <returns><c>true</c> if <see cref="Authenticator"/> is value, otherwise <c>false</c>.</returns>
 /// <exception cref="ArgumentNullException"><paramref name="requestPacket"/> or <paramref name="sharedSecret"/> is <c>null</c>.</exception>
 public bool VerifyResponse(RadiusPacket requestPacket, byte[] sharedSecret)
 {
     if (requestPacket == null)
     {
         throw new ArgumentNullException("requestPacket");
     }
     if (sharedSecret == null)
     {
         throw new ArgumentNullException("sharedSecret");
     }
     return(Verify(requestPacket.buffer, 4, sharedSecret));
 }
예제 #2
0
 /// <summary>
 /// Creates the default <see cref="Authenticator"/> for a response packet to a given request.
 /// </summary>
 /// <param name="requestPacket">The RADIUS request packet to this response.</param>
 /// <param name="sharedSecret">The shared RADIUS secret.</param>
 /// <exception cref="ArgumentNullException"><paramref name="requestPacket"/> or <paramref name="sharedSecret"/> is <c>null</c>.</exception>
 /// <exception cref="NotSupportedException">The packet is read-only.</exception>
 public void SignResponse(RadiusPacket requestPacket, byte[] sharedSecret)
 {
     if (requestPacket == null)
     {
         throw new ArgumentNullException("requestPacket");
     }
     if (sharedSecret == null)
     {
         throw new ArgumentNullException("sharedSecret");
     }
     Sign(requestPacket.buffer, 4, sharedSecret);
 }
예제 #3
0
 internal RadiusAttributeList(RadiusPacket packet, RadiusAttributeParser <T> parser)
 {
     this.packet = packet;
     this.parser = parser;
 }