Package org.tinyradius.packet.util
Interface MessageAuthSupport<T extends MessageAuthSupport<?>>
- Type Parameters:
T
- same type as implementation
- All Superinterfaces:
AttributeHolder
,NestedAttributeHolder
,RadiusPacket
- All Known Implementing Classes:
AccessRequest
,AccessRequestChap
,AccessRequestEap
,AccessRequestPap
,AccessResponse
public interface MessageAuthSupport<T extends MessageAuthSupport<?>> extends RadiusPacket
Partial implementation for supporting Message-Authenticator (RFC 2869)
-
Field Summary
Fields Modifier and Type Field Description static byte
MESSAGE_AUTHENTICATOR
-
Method Summary
Modifier and Type Method Description default byte[]
calcMessageAuthInput(byte[] requestAuth)
default byte[]
computeMessageAuth(java.lang.String sharedSecret, byte[] requestAuth)
T
copy()
default T
encodeMessageAuth(java.lang.String sharedSecret, byte[] requestAuth)
static javax.crypto.Mac
getHmacMd5(java.lang.String key)
default void
verifyMessageAuth(java.lang.String sharedSecret, byte[] requestAuth)
Methods inherited from interface org.tinyradius.attribute.util.AttributeHolder
addAttribute, addAttribute, getAttribute, getAttribute, getAttributeBytes, getAttributeMap, getAttributes, getAttributes, getAttributeString, getChildVendorId, lookupAttributeType, removeAttributes, removeLastAttribute
Methods inherited from interface org.tinyradius.attribute.util.NestedAttributeHolder
addAttribute, getAttribute, getAttributes, getAttributes, getVendorSpecificAttributes, removeAttribute, removeAttributes, removeSubAttribute
Methods inherited from interface org.tinyradius.packet.RadiusPacket
getAttributes, getAuthenticator, getDictionary, getId, getType
-
Field Details
-
MESSAGE_AUTHENTICATOR
static final byte MESSAGE_AUTHENTICATOR- See Also:
- Constant Field Values
-
-
Method Details
-
copy
T copy()- Specified by:
copy
in interfaceRadiusPacket
- Returns:
- packet of same type as self, including intermediate/transient fields
-
encodeMessageAuth
- Parameters:
sharedSecret
- share secretrequestAuth
- current packet auth if encoding request, otherwise auth for corresponding request- Returns:
- shallow copy of packet
-
verifyMessageAuth
default void verifyMessageAuth(java.lang.String sharedSecret, byte[] requestAuth) throws RadiusPacketException- Throws:
RadiusPacketException
-
computeMessageAuth
default byte[] computeMessageAuth(java.lang.String sharedSecret, byte[] requestAuth) -
calcMessageAuthInput
default byte[] calcMessageAuthInput(byte[] requestAuth) -
getHmacMd5
static javax.crypto.Mac getHmacMd5(java.lang.String key)
-