public final class NtlmPasswordAuthentication extends Object implements Principal, Serializable
Read jCIFS Exceptions and NtlmAuthenticator for related information.
| 修飾子とタイプ | フィールドと説明 |
|---|---|
static NtlmPasswordAuthentication |
ANONYMOUS |
| コンストラクタと説明 |
|---|
NtlmPasswordAuthentication(String userInfo)
Create an NtlmPasswordAuthentication object from the userinfo
component of an SMB URL like "domain;user:pass".
|
NtlmPasswordAuthentication(String domain,
String username,
byte[] challenge,
byte[] ansiHash,
byte[] unicodeHash)
Create an NtlmPasswordAuthentication object with raw password
hashes.
|
NtlmPasswordAuthentication(String domain,
String username,
String password)
Create an NtlmPasswordAuthentication object from a
domain, username, and password.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
boolean |
equals(Object obj)
Compares two NtlmPasswordAuthentication objects for
equality.
|
byte[] |
getAnsiHash(byte[] challenge)
Computes the 24 byte ANSI password hash given the 8 byte server challenge.
|
String |
getDomain()
Returns the domain.
|
static byte[] |
getLMv2Response(byte[] responseKeyLM,
byte[] serverChallenge,
byte[] clientChallenge) |
static byte[] |
getLMv2Response(String domain,
String user,
String password,
byte[] challenge,
byte[] clientChallenge)
Creates the LMv2 response for the supplied information.
|
String |
getName()
Return the domain and username in the format:
domain\\username.
|
static byte[] |
getNTLM2Response(byte[] nTOWFv1,
byte[] serverChallenge,
byte[] clientChallenge) |
static byte[] |
getNTLMResponse(String password,
byte[] challenge)
Generate the Unicode MD4 hash for the password associated with these credentials.
|
static byte[] |
getNTLMv2Response(byte[] responseKeyNT,
byte[] serverChallenge,
byte[] clientChallenge,
long nanos1601,
byte[] targetInfo) |
String |
getPassword()
Returns the password in plain text or null if the raw password
hashes were used to construct this NtlmPasswordAuthentication
object which will be the case when NTLM HTTP Authentication is
used.
|
static byte[] |
getPreNTLMResponse(String password,
byte[] challenge)
Generate the ANSI DES hash for the password associated with these credentials.
|
byte[] |
getSigningKey(byte[] challenge) |
byte[] |
getUnicodeHash(byte[] challenge)
Computes the 24 byte Unicode password hash given the 8 byte server challenge.
|
String |
getUsername()
Returns the username.
|
byte[] |
getUserSessionKey(byte[] challenge)
Returns the effective user session key.
|
int |
hashCode()
Return the upcased username hash code.
|
static byte[] |
nTOWFv1(String password) |
static byte[] |
nTOWFv2(String domain,
String username,
String password) |
String |
toString()
Return the domain and username in the format:
domain\\username.
|
public static final NtlmPasswordAuthentication ANONYMOUS
public NtlmPasswordAuthentication(String userInfo)
public NtlmPasswordAuthentication(String domain, String username, String password)
public NtlmPasswordAuthentication(String domain, String username, byte[] challenge, byte[] ansiHash, byte[] unicodeHash)
public static byte[] getPreNTLMResponse(String password, byte[] challenge)
public static byte[] getNTLMResponse(String password, byte[] challenge)
public static byte[] getLMv2Response(String domain, String user, String password, byte[] challenge, byte[] clientChallenge)
domain - The domain in which the username exists.user - The username.password - The user's password.challenge - The server challenge.clientChallenge - The client challenge (nonce).public static byte[] getNTLM2Response(byte[] nTOWFv1,
byte[] serverChallenge,
byte[] clientChallenge)
public static byte[] nTOWFv1(String password)
public static byte[] getLMv2Response(byte[] responseKeyLM,
byte[] serverChallenge,
byte[] clientChallenge)
public static byte[] getNTLMv2Response(byte[] responseKeyNT,
byte[] serverChallenge,
byte[] clientChallenge,
long nanos1601,
byte[] targetInfo)
public String getDomain()
public String getUsername()
public String getPassword()
public String getName()
public byte[] getAnsiHash(byte[] challenge)
public byte[] getUnicodeHash(byte[] challenge)
public byte[] getSigningKey(byte[] challenge)
throws SmbException
SmbExceptionpublic byte[] getUserSessionKey(byte[] challenge)
challenge - The server challenge.byte[] containing the effective user session key,
used in SMB MAC signing and NTLMSSP signing and sealing.public boolean equals(Object obj)
public int hashCode()
Copyright © 2016. All rights reserved.