public class NTLMv2Blob extends Object
Contains methods to pack/unpack and calculate the hash of an NTLMv2 blob.
Modifier and Type | Field and Description |
---|---|
static int |
CHALLENGE_LEN |
static int |
HMAC_LEN |
static int |
OFFSET_CHALLENGE |
static int |
OFFSET_HEADER |
static int |
OFFSET_HMAC |
static int |
OFFSET_RESERVED |
static int |
OFFSET_TARGETINFO |
static int |
OFFSET_TIMESTAMP |
static int |
OFFSET_UNKNOWN |
Constructor and Description |
---|
NTLMv2Blob(byte[] buf)
Class constructor
|
NTLMv2Blob(byte[] buf,
int offset,
int len)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
byte[] |
calculateHMAC(byte[] challenge,
byte[] v2hash)
Calculate the HMAC of the blob using the specified NTLMv2 hash and challenge
|
byte[] |
calculateLMv2HMAC(byte[] v2hash,
byte[] srvChallenge,
byte[] clChallenge)
Calcualte the LMv2 HMAC value
|
void |
Dump()
Dump the NTLMv2 blob details
|
byte[] |
getBuffer()
Return the buffer
|
byte[] |
getClientChallenge()
Return the client challenge
|
byte[] |
getHMAC()
Return the HMAC from the buffer
|
int |
getLength()
Return the blob length
|
int |
getOffset()
Return the offset
|
long |
getTimeStamp()
Return the timestamp from the buffer, in NT 64bit time format
|
public static final int HMAC_LEN
public static final int CHALLENGE_LEN
public static final int OFFSET_HMAC
public static final int OFFSET_HEADER
public static final int OFFSET_RESERVED
public static final int OFFSET_TIMESTAMP
public static final int OFFSET_CHALLENGE
public static final int OFFSET_UNKNOWN
public static final int OFFSET_TARGETINFO
public NTLMv2Blob(byte[] buf)
buf
- byte[]public NTLMv2Blob(byte[] buf, int offset, int len)
buf
- byte[]offset
- intlen
- intpublic final byte[] getBuffer()
public final int getOffset()
public final int getLength()
public final byte[] getHMAC()
public final long getTimeStamp()
public final byte[] getClientChallenge()
public final byte[] calculateHMAC(byte[] challenge, byte[] v2hash) throws Exception
challenge
- byte[]v2hash
- byte[]Exception
public final byte[] calculateLMv2HMAC(byte[] v2hash, byte[] srvChallenge, byte[] clChallenge) throws Exception
v2hash
- byte[]srvChallenge
- byte[]clChallenge
- byte[]Exception
public final void Dump()
Copyright © 2005–2017 Alfresco Software. All rights reserved.