public EAPMD5Authenticator() { setEAPType(EAP_MD5); }
public byte[] doEAPType(byte id, byte[] data) throws NoSuchAlgorithmException { byte md5len = data[0]; byte[] md5data = new byte[md5len]; System.arraycopy(data, 1, md5data, 0, md5len); byte[] response = new byte[17]; response[0] = 16; System.arraycopy(CHAP.chapMD5(id, getPassword(), md5data), 0, response, 1, 16); return response; } }
public RadiusAuthenticator getAuthenticator() { final RadiusAuthenticator auth; final String authType = getAuthType(); if (authType.equalsIgnoreCase("chap")) { auth = new CHAPAuthenticator(); } else if (authType.equalsIgnoreCase("pap")) { auth = new PAPAuthenticator(); } else if (authType.equalsIgnoreCase("mschapv1")) { auth = new MSCHAPv1Authenticator(); } else if (authType.equalsIgnoreCase("mschapv2")) { auth = new MSCHAPv2Authenticator(); } else if (authType.equalsIgnoreCase("eapmd5") || authType.equalsIgnoreCase("eap-md5")) { auth = new EAPMD5Authenticator(); } else if (authType.equalsIgnoreCase("eapmschapv2") || authType.equalsIgnoreCase("eap-mschapv2")) { auth = new EAPMSCHAPv2Authenticator(); } else if (RadiusUtils.isEAPTTLS(authType)) { auth = new EAPTTLSAuthenticator(); } else { auth = null; } return auth; }
public byte[] doEAPType(byte id, byte[] data) throws NoSuchAlgorithmException { byte md5len = data[0]; byte[] md5data = new byte[md5len]; System.arraycopy(data, 1, md5data, 0, md5len); byte[] response = new byte[17]; response[0] = 16; System.arraycopy(CHAP.chapMD5(id, getPassword(), md5data), 0, response, 1, 16); return response; } }
auth = new MSCHAPv2Authenticator(); } else if (authType.equalsIgnoreCase("eapmd5") || authType.equalsIgnoreCase("eap-md5")) { auth = new EAPMD5Authenticator(); } else if (authType.equalsIgnoreCase("eapmschapv2") || authType.equalsIgnoreCase("eap-mschapv2")) { auth = new EAPMSCHAPv2Authenticator();
public EAPMD5Authenticator() { setEAPType(EAP_MD5); }