Package ru.bitel.bgbilling.kernel.network.radius

# Class RadiusUtils

java.lang.Object
ru.bitel.bgbilling.kernel.network.radius.RadiusUtils

public class RadiusUtils extends Object

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `RadiusUtils.RadiusPacketAdapter`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static boolean`
  `logEnable`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RadiusUtils()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `addToLog(DefaultServerSetup setup, int mid, RadiusPacket packet, Date logMonthDate, int recordId)`
  `static boolean`
  `checkChapPassword(RadiusAttributeSet packet, byte[] authenticator, String openPassword)`
  `static boolean`
  `checkDigestMD5Password(RadiusAttributeSet packet, String openPassw)`
  `static boolean`
  `checkDigestPassword(RadiusAttributeSet packet, RadiusAttributeSet response, String openPassw)`
  `static int`
  `checkMessageAuthenticator(RadiusPacket packet, ByteBuffer bb, byte[] secret)`
  `static boolean`
  `checkPassword(ru.bitel.bgbilling.kernel.network.radius.nas.Nas<?,?,?> nas, String openPassw, RadiusAttributeSet packet, RadiusAttributeSet response, byte[] secret, byte[] authenticator)`
  `static void`
  `decryptPassword(RadiusPacket request, byte[] secret)`
  `static byte[]`
  `encodeChapPassword(String userPassword, byte[] chapChallenge)`
  `static byte[]`
  `encodePapPassword(byte[] userPassword, byte[] secret, byte[] authenticator)`
  `static byte[]`
  `getHmacMD5(byte[] key, ByteBuffer data)`
  `static int`
  `getNasPort(RadiusPacket request)`
  `static int`
  `insertToLog(DefaultServerSetup setup, int mid, RadiusPacket packet, Date logMonthDate)`
  `static byte[]`
  `next()`
  16
  `static byte[]`
  `next(int num)`
  `static void`
  `setChapPassword(RadiusPacket packet, String userPassword)`
  `static void`
  `setPapPassword(RadiusPacket packet, byte[] secret, String userPassword)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### logEnable

    public static volatile boolean logEnable

- ## Constructor Details

  - ### RadiusUtils

    public RadiusUtils()

- ## Method Details

  - ### checkMessageAuthenticator

    public static int checkMessageAuthenticator(RadiusPacket packet, ByteBuffer bb, byte[] secret) throws InvalidKeyException, NoSuchAlgorithmException
    Throws:
      `InvalidKeyException`
      `NoSuchAlgorithmException`

  - ### getHmacMD5

    public static byte[] getHmacMD5(byte[] key, ByteBuffer data) throws NoSuchAlgorithmException, InvalidKeyException
    Throws:
      `NoSuchAlgorithmException`
      `InvalidKeyException`

  - ### next

    public static byte[] next()
    16

  - ### next

    public static byte[] next(int num)

  - ### encodeChapPassword

    public static byte[] encodeChapPassword(String userPassword, byte[] chapChallenge) throws NoSuchAlgorithmException, UnsupportedEncodingException
    Throws:
      `NoSuchAlgorithmException`
      `UnsupportedEncodingException`

  - ### encodePapPassword

    public static byte[] encodePapPassword(byte[] userPassword, byte[] secret, byte[] authenticator) throws NoSuchAlgorithmException
    Throws:
      `NoSuchAlgorithmException`

  - ### setChapPassword

    public static void setChapPassword(RadiusPacket packet, String userPassword) throws NoSuchAlgorithmException, UnsupportedEncodingException
    Throws:
      `NoSuchAlgorithmException`
      `UnsupportedEncodingException`

  - ### setPapPassword

    public static void setPapPassword(RadiusPacket packet, byte[] secret, String userPassword) throws NoSuchAlgorithmException, UnsupportedEncodingException
    Throws:
      `NoSuchAlgorithmException`
      `UnsupportedEncodingException`

  - ### decryptPassword

    public static void decryptPassword(RadiusPacket request, byte[] secret)

  - ### checkChapPassword

    public static boolean checkChapPassword(RadiusAttributeSet packet, byte[] authenticator, String openPassword)

  - ### checkDigestMD5Password

    public static boolean checkDigestMD5Password(RadiusAttributeSet packet, String openPassw)

  - ### checkDigestPassword

    public static boolean checkDigestPassword(RadiusAttributeSet packet, RadiusAttributeSet response, String openPassw)

  - ### checkPassword

    public static boolean checkPassword(ru.bitel.bgbilling.kernel.network.radius.nas.Nas<?,?,?> nas, String openPassw, RadiusAttributeSet packet, RadiusAttributeSet response, byte[] secret, byte[] authenticator)

  - ### insertToLog

    public static int insertToLog(DefaultServerSetup setup, int mid, RadiusPacket packet, Date logMonthDate)

  - ### addToLog

    public static void addToLog(DefaultServerSetup setup, int mid, RadiusPacket packet, Date logMonthDate, int recordId)

  - ### getNasPort

    public static int getNasPort(RadiusPacket request)