Interface MessageAuthSupport<T extends RadiusPacket<T>>

Type Parameters:
T - same type as implementation
All Superinterfaces:
AttributeHolder<T>, NestedAttributeHolder<T>, RadiusPacket<T>
All Known Implementing Classes:
AccessRequest, AccessRequestArap, AccessRequestChap, AccessRequestEap, AccessRequestNoAuth, AccessRequestPap, AccessResponse, AccessResponse.Accept, AccessResponse.Challenge, AccessResponse.Reject

public interface MessageAuthSupport<T extends RadiusPacket<T>>
extends RadiusPacket<T>
Partial implementation for encoding/verifying Message-Authenticator (RFC 2869)
  • Field Details

  • Method Details

    • calcMessageAuthInput

      static byte[] calcMessageAuthInput​(RadiusPacket<?> packet, byte[] requestAuth)
    • getHmacMd5

      static javax.crypto.Mac getHmacMd5​(java.lang.String key)
    • verifyMessageAuth

      default void verifyMessageAuth​(java.lang.String sharedSecret, byte[] requestAuth) throws RadiusPacketException
      Throws:
      RadiusPacketException
    • computeMessageAuth

      default byte[] computeMessageAuth​(RadiusPacket<?> packet, java.lang.String sharedSecret, byte[] requestAuth)
    • encodeMessageAuth

      default T encodeMessageAuth​(java.lang.String sharedSecret, byte[] requestAuth)
      Creates packet with an encoded Message-Authenticator attribute.

      Note: 'this' packet authenticator is ignored, only requestAuth param is used.

      Parameters:
      sharedSecret - shared secret
      requestAuth - current packet auth if encoding request, otherwise corresponding request auth
      Returns:
      encoded copy of packet