|
AXL Software | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
ObjectMSChap
Class to handle the code described in RFC 2433 of MS-CHAP V1 and RFC 2759 MS-CHAP V2.
| Field Summary | |
static int |
CHALLENGE_LENGTH
Length of a MSCHAP challenge - 8. |
static boolean |
NTHASH_PASSWORD
Indicates that the password is an NT Hash of the plain text password. |
static int |
NTHASH_PASSWORD_LENGTH
NT Password hash length in bytes - 16. |
static boolean |
PLAINTEXT_PASSWORD
Indicates that the password is plain text. |
static int |
RESPONSE_LENGTH
Length of a MSCHAP response - 24. |
| Constructor Summary | |
MSChap()
Constructor. |
|
| Method Summary | |
byte[] |
ChallengeResponse(byte[] challenge,
byte[] passwordHash)
Calculate the ChallengeResponse. |
static byte[] |
createChallenge()
Create random 8 byte challenge. |
byte[] |
DesEncrypt(byte[] clear,
byte[] key)
|
byte[] |
DesHash(byte[] clear)
|
byte |
getIdent(byte lastId)
Get a CHAP Ident value. |
byte[] |
HashNtPasswordHash(byte[] ntPasswordHash)
|
byte[] |
LmChallengeResponse(byte[] challenge,
byte[] password)
|
byte[] |
LmEncryptedPasswordHash(byte[] oemPassword,
byte[] key)
|
byte[] |
LmPasswordHash(byte[] oemPassword)
|
byte[] |
NtChallengeResponse(byte[] challenge,
byte[] password,
boolean ntHash)
Encode the NT password for the NT password response. |
byte[] |
NtEncryptedPasswordHash(byte[] oemPassword,
byte[] challenge,
boolean ntHash)
|
byte[] |
NtPasswordHash(byte[] unicodePassword)
Produce the NTPassworHash. |
byte[] |
parityKey(byte[] in)
|
byte[] |
PasswordHashEncryptedWithBlock(byte[] passwordHash,
byte[] block)
|
byte[] |
toUnicode(byte[] in)
Convert a byte array into a UNICODE array. |
| Methods inherited from class Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int CHALLENGE_LENGTH
public static final boolean NTHASH_PASSWORD
public static final int NTHASH_PASSWORD_LENGTH
public static final boolean PLAINTEXT_PASSWORD
public static final int RESPONSE_LENGTH
| Constructor Detail |
public MSChap()
throws RADIUSException
RADIUSException - if the DES cipher cannot be found.| Method Detail |
public final byte[] ChallengeResponse(byte[] challenge,
byte[] passwordHash)
throws RADIUSException
challenge - Challenge.passwordHash - Hash of the NT
RADIUSExceptionpublic static final byte[] createChallenge()
public final byte[] DesEncrypt(byte[] clear,
byte[] key)
throws RADIUSException
RADIUSException
public final byte[] DesHash(byte[] clear)
throws RADIUSException
RADIUSExceptionpublic final byte getIdent(byte lastId)
lastId - Last used ID value.
public byte[] HashNtPasswordHash(byte[] ntPasswordHash)
public final byte[] LmChallengeResponse(byte[] challenge,
byte[] password)
throws RADIUSException
RADIUSException
public final byte[] LmEncryptedPasswordHash(byte[] oemPassword,
byte[] key)
throws RADIUSException
RADIUSException
public final byte[] LmPasswordHash(byte[] oemPassword)
throws RADIUSException
RADIUSException
public final byte[] NtChallengeResponse(byte[] challenge,
byte[] password,
boolean ntHash)
throws RADIUSException
challenge - Challenge bytes.password - Password bytes - if not UNICODE (UTF8 or ASCII) it will be translated.
RADIUSException - if there's a problem using the DES algorithm.
public final byte[] NtEncryptedPasswordHash(byte[] oemPassword,
byte[] challenge,
boolean ntHash)
throws RADIUSException
RADIUSExceptionpublic final byte[] NtPasswordHash(byte[] unicodePassword)
unicodePassword - NT password as represented in unicode.
Only the first 256 bytes will be processed.
NTHASH_PASSWORD_LENGTH.public final byte[] parityKey(byte[] in)
public final byte[] PasswordHashEncryptedWithBlock(byte[] passwordHash,
byte[] block)
throws RADIUSException
RADIUSExceptionpublic final byte[] toUnicode(byte[] in)
in - Byte array to convert.
|
AXL Software | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||