Example:
Client client = new Client(null, "host", "dummy",
"REALM", "t0pSeCr3t".toCharArray());
byte[] type1 = client.type1();
// Send type1 to server and receive response as type2
byte[] type3 = client.type3(type2, nonce);
// Send type3 to server
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private final String | |
| private byte[] | |
| private byte[] | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | Client(String
the NTLM version to use, which can be:
version, String
hostname of the client, can be null hostname, String username to be authenticated, must not be null username, String domain of domain, char[] username, can be nullpassword for password)username, must not be not null.
This method does not make any modification to this parameter, it neither
needs to access the content of this parameter after this method call,
so you are free to modify or nullify this parameter after this call.Creates an NTLM Client instance. |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public String | Returns: the domainReturns the domain value provided by server after the authentication is complete, or the domain value provided by the client before it. |
| public byte[] | |
| public byte[] | Returns: the message generatedthe responding Type 2 message from server, must not be null type2, byte[] random 8-byte array to be used in message generation,
must not be null except for original NTLM v1 nonce)Generates the Type 3 message |
| domain | back to summary |
|---|---|
| private String domain | |
| hostname | back to summary |
|---|---|
| private final String hostname | |
| pw1 | back to summary |
|---|---|
| private byte[] pw1 | |
| pw2 | back to summary |
|---|---|
| private byte[] pw2 | |
| username | back to summary |
|---|---|
| private final String username | |
| Client | back to summary |
|---|---|
| public Client(String version, String hostname, String username, String domain, char[] password) throws NTLMException Creates an NTLM Client instance.
| |
| dispose | back to summary |
|---|---|
| public void dispose() Disposes any password-derived information. | |
| getDomain | back to summary |
|---|---|
| public String getDomain() Returns the domain value provided by server after the authentication is complete, or the domain value provided by the client before it.
| |
| type1 | back to summary |
|---|---|
| public byte[] type1() Generates the Type 1 message
| |
| type3 | back to summary |
|---|---|
| public byte[] type3(byte[] type2, byte[] nonce) throws NTLMException Generates the Type 3 message
| |