public final class RadiusUtils extends Object
| Constructor and Description |
|---|
RadiusUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
byteArrayToHexString(byte[] in)
Converts a binary array to a human readable string
|
static byte[] |
decodePapPassword(byte[] encryptedPass,
byte[] authenticator,
String sharedSecret) |
static byte[] |
encodePapPassword(byte[] userPass,
byte[] requestAuthenticator,
String sharedSecret)
This method encodes the plaintext user password according to RFC 2865
|
static byte[] |
makeRFC2865RequestAuthenticator(String sharedSecret)
This method builds a Request Authenticator for use in outgoing RADIUS
Access-Request packets as specified in RFC 2865.
|
static byte[] |
makeRFC2865ResponseAuthenticator(String sharedSecret,
byte code,
byte identifier,
short length,
byte[] requestAuthenticator,
byte[] responseAttributeBytes,
int responseAttributeLength)
This method builds a Response Authenticator for use in validating
responses from the RADIUS Authentication process as specified in RFC 2865.
|
static byte[] |
makeRFC2866RequestAuthenticator(String sharedSecret,
byte code,
byte identifier,
int length,
byte[] requestAttributes,
int attributesOffset,
int attributesLength)
This method builds a Request Authenticator for use in RADIUS Accounting
packets as specified in RFC 2866.
|
public static byte[] encodePapPassword(byte[] userPass,
byte[] requestAuthenticator,
String sharedSecret)
userPass - java.lang.String the password to encryptrequestAuthenticator - byte[] the requestAuthenicator to use in the encryptionpublic static byte[] decodePapPassword(byte[] encryptedPass,
byte[] authenticator,
String sharedSecret)
public static byte[] makeRFC2865RequestAuthenticator(String sharedSecret)
public static byte[] makeRFC2865ResponseAuthenticator(String sharedSecret, byte code, byte identifier, short length, byte[] requestAuthenticator, byte[] responseAttributeBytes, int responseAttributeLength)
code - byteidentifier - bytelength - shortrequestAuthenticator - byte[]responseAttributeBytes - byte[]public static byte[] makeRFC2866RequestAuthenticator(String sharedSecret, byte code, byte identifier, int length, byte[] requestAttributes, int attributesOffset, int attributesLength)
code - byteidentifier - bytelength - shortrequestAttributes - byte[]public static String byteArrayToHexString(byte[] in)
in - bytes to be hexedCopyright © 2017. All rights reserved.