public abstract class NTLMMessage
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BufferHeaderLen |
static int |
OffsetSignature |
static int |
OffsetType |
| Modifier | Constructor and Description |
|---|---|
protected |
NTLMMessage()
Default constructor
|
protected |
NTLMMessage(byte[] buf,
int offset,
int len)
Class constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
copyFrom(byte[] buf,
int offset,
int len)
Copy the NTLM blob data from the specified buffer
|
protected int |
getByteOffset(int offset)
Return the offset for a byte value
|
byte[] |
getBytes()
Return the NTLM message as a byte array
|
protected byte[] |
getByteValue(int offset)
Return a byte value that has a header
|
abstract int |
getFlags()
Return the message flags
|
protected int |
getIntValue(int offset)
Return an int/32bit value
|
int |
getLength()
Return the message length
|
protected byte[] |
getRawBytes(int offset,
int len)
Return a block of byte data
|
protected java.lang.String |
getRawString(int offset,
int len,
boolean isuni)
Return a raw string
|
protected int |
getShortValue(int offset)
Return a short/16bit value
|
protected int |
getStringAllocatedLength(int offset)
Return the allocated length of a string
|
protected int |
getStringLength(int offset)
Return the length of a string
|
protected int |
getStringOffset(int offset)
Return the string data offset
|
protected java.lang.String |
getStringValue(int offset,
boolean isuni)
Return a string value
|
boolean |
hasFlag(int flag)
Return the state of the specified flag
|
protected void |
initializeHeader(int typ,
int flags)
Initialize the blob
|
int |
isMessageType()
Return the message type
|
static int |
isNTLMType(byte[] buf)
Validate and determine the NTLM message type
|
static int |
isNTLMType(byte[] buf,
int offset)
Validate and determine the NTLM message type
|
protected int |
setByteValue(int offset,
byte[] byts,
int dataOffset)
Set a byte array value
|
protected abstract void |
setFlags(int flags)
Set the message flags
|
protected void |
setIntValue(int offset,
int val)
Set an int/32bit value
|
protected void |
setLength(int len)
Set the message length
|
void |
setMessageType(int typ)
Set the message type
|
protected void |
setRawBytes(int offset,
byte[] byts)
Set a raw byte value
|
protected void |
setRawInts(int offset,
int[] ints)
Set raw int values
|
protected int |
setRawString(int offset,
java.lang.String str,
boolean isuni)
Pack a raw string
|
protected void |
setShortValue(int offset,
int sval)
Set a short/16bit value
|
protected int |
setStringValue(int offset,
java.lang.String val,
int strOffset,
boolean isuni)
Set a string value
|
protected void |
zeroBytes(int offset,
int len)
Zero out an area of bytes
|
public static final int OffsetSignature
public static final int OffsetType
public static final int BufferHeaderLen
protected NTLMMessage()
protected NTLMMessage(byte[] buf,
int offset,
int len)
buf - byte[]offset - intlen - intpublic final int isMessageType()
public abstract int getFlags()
public final boolean hasFlag(int flag)
flag - intpublic int getLength()
public final void setMessageType(int typ)
typ - intpublic final void copyFrom(byte[] buf,
int offset,
int len)
buf - byte[]offset - intlen - intpublic final byte[] getBytes()
protected abstract void setFlags(int flags)
flags - intprotected void initializeHeader(int typ,
int flags)
typ - intflags - intprotected final int getShortValue(int offset)
offset - intprotected final int getIntValue(int offset)
offset - intprotected final int getByteOffset(int offset)
offset - intprotected final byte[] getByteValue(int offset)
offset - intprotected final byte[] getRawBytes(int offset,
int len)
offset - intlen - intprotected final int getStringLength(int offset)
offset - intprotected final int getStringAllocatedLength(int offset)
offset - intprotected final int getStringOffset(int offset)
offset - intprotected final java.lang.String getStringValue(int offset,
boolean isuni)
offset - intisuni - booleanprotected final java.lang.String getRawString(int offset,
int len,
boolean isuni)
offset - intlen - intisuni - booleanprotected final void setShortValue(int offset,
int sval)
offset - intsval - intprotected final void setIntValue(int offset,
int val)
offset - intval - intprotected final void setRawBytes(int offset,
byte[] byts)
offset - intbyts - byte[]protected final void setRawInts(int offset,
int[] ints)
offset - intints - int[]protected final int setRawString(int offset,
java.lang.String str,
boolean isuni)
offset - intstr - Stringisuni - booleanprotected final void zeroBytes(int offset,
int len)
offset - intlen - intprotected final int setByteValue(int offset,
byte[] byts,
int dataOffset)
offset - intbyts - byte[]dataOffset - intprotected final int setStringValue(int offset,
java.lang.String val,
int strOffset,
boolean isuni)
offset - intval - StringstrOffset - intisuni - booleanprotected final void setLength(int len)
len - intpublic static final int isNTLMType(byte[] buf)
buf - byte[]public static final int isNTLMType(byte[] buf,
int offset)
buf - byte[]offset - intCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.