public class RadiusUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RadiusUtils.RadiusPacketAdapter |
Modifier and Type | Field and Description |
---|---|
static boolean |
logEnable |
Constructor and Description |
---|
RadiusUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addToLog(DefaultServerSetup setup,
int mid,
RadiusPacket packet,
java.util.Date logMonthDate,
int recordId) |
static boolean |
checkChapPassword(RadiusAttributeSet packet,
byte[] authenticator,
java.lang.String openPassword) |
static boolean |
checkDigestMD5Password(RadiusAttributeSet packet,
java.lang.String openPassw) |
static boolean |
checkDigestPassword(RadiusAttributeSet packet,
RadiusAttributeSet response,
java.lang.String openPassw) |
static int |
checkMessageAuthenticator(RadiusPacket packet,
java.nio.ByteBuffer bb,
byte[] secret) |
static boolean |
checkPassword(ru.bitel.bgbilling.kernel.network.radius.nas.Nas<?,?,?> nas,
java.lang.String openPassw,
RadiusAttributeSet packet,
RadiusAttributeSet response,
byte[] secret,
byte[] authenticator) |
static void |
decryptPassword(RadiusPacket request,
byte[] secret) |
static byte[] |
encodeChapPassword(java.lang.String userPassword,
byte[] chapChallenge) |
static byte[] |
encodePapPassword(byte[] userPassword,
byte[] secret,
byte[] authenticator) |
static byte[] |
getHmacMD5(byte[] key,
java.nio.ByteBuffer data) |
static int |
getNasPort(RadiusPacket request) |
static int |
insertToLog(DefaultServerSetup setup,
int mid,
RadiusPacket packet,
java.util.Date logMonthDate) |
static byte[] |
next()
16
|
static byte[] |
next(int num) |
static void |
setChapPassword(RadiusPacket packet,
java.lang.String userPassword) |
static void |
setPapPassword(RadiusPacket packet,
byte[] secret,
java.lang.String userPassword) |
public static int checkMessageAuthenticator(RadiusPacket packet, java.nio.ByteBuffer bb, byte[] secret) throws java.security.InvalidKeyException, java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
java.security.NoSuchAlgorithmException
public static byte[] getHmacMD5(byte[] key, java.nio.ByteBuffer data) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
public static byte[] next()
public static byte[] next(int num)
public static byte[] encodeChapPassword(java.lang.String userPassword, byte[] chapChallenge) throws java.security.NoSuchAlgorithmException, java.io.UnsupportedEncodingException
java.security.NoSuchAlgorithmException
java.io.UnsupportedEncodingException
public static byte[] encodePapPassword(byte[] userPassword, byte[] secret, byte[] authenticator) throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
public static void setChapPassword(RadiusPacket packet, java.lang.String userPassword) throws java.security.NoSuchAlgorithmException, java.io.UnsupportedEncodingException
java.security.NoSuchAlgorithmException
java.io.UnsupportedEncodingException
public static void setPapPassword(RadiusPacket packet, byte[] secret, java.lang.String userPassword) throws java.security.NoSuchAlgorithmException, java.io.UnsupportedEncodingException
java.security.NoSuchAlgorithmException
java.io.UnsupportedEncodingException
public static void decryptPassword(RadiusPacket request, byte[] secret)
public static boolean checkChapPassword(RadiusAttributeSet packet, byte[] authenticator, java.lang.String openPassword)
public static boolean checkDigestMD5Password(RadiusAttributeSet packet, java.lang.String openPassw)
public static boolean checkDigestPassword(RadiusAttributeSet packet, RadiusAttributeSet response, java.lang.String openPassw)
public static boolean checkPassword(ru.bitel.bgbilling.kernel.network.radius.nas.Nas<?,?,?> nas, java.lang.String openPassw, RadiusAttributeSet packet, RadiusAttributeSet response, byte[] secret, byte[] authenticator)
public static int insertToLog(DefaultServerSetup setup, int mid, RadiusPacket packet, java.util.Date logMonthDate)
public static void addToLog(DefaultServerSetup setup, int mid, RadiusPacket packet, java.util.Date logMonthDate, int recordId)
public static int getNasPort(RadiusPacket request)