Module jcifs

Class NtlmMessage

java.lang.Object
org.codelibs.jcifs.smb.ntlmssp.NtlmMessage
All Implemented Interfaces:
NtlmFlags
Direct Known Subclasses:
Type1Message, Type2Message, Type3Message

public abstract class NtlmMessage extends Object implements NtlmFlags
Abstract superclass for all NTLMSSP messages.
  • Field Details

    • NTLMSSP_SIGNATURE

      protected static final byte[] NTLMSSP_SIGNATURE
      The NTLMSSP "preamble".
    • NTLMSSP_VERSION

      protected static final byte[] NTLMSSP_VERSION
      NTLM version
    • NTLMSSP_TYPE1

      protected static final int NTLMSSP_TYPE1
      NTLMSSP Type 1 message identifier.
      See Also:
    • NTLMSSP_TYPE2

      protected static final int NTLMSSP_TYPE2
      NTLMSSP Type 2 message identifier.
      See Also:
    • NTLMSSP_TYPE3

      protected static final int NTLMSSP_TYPE3
      NTLMSSP Type 3 message identifier.
      See Also:
    • UNI_ENCODING

      protected static final String UNI_ENCODING
      Unicode encoding used for NTLM messages.
      See Also:
  • Constructor Details

    • NtlmMessage

      protected NtlmMessage()
      Default constructor.
  • Method Details

    • getFlags

      public int getFlags()
      Returns the flags currently in use for this message.
      Returns:
      An int containing the flags in use for this message.
    • setFlags

      public void setFlags(int flags)
      Sets the flags for this message.
      Parameters:
      flags - The flags for this message.
    • getFlag

      public boolean getFlag(int flag)
      Returns the status of the specified flag.
      Parameters:
      flag - The flag to test (i.e., NTLMSSP_NEGOTIATE_OEM).
      Returns:
      A boolean indicating whether the flag is set.
    • setFlag

      public void setFlag(int flag, boolean value)
      Sets or clears the specified flag.
      Parameters:
      flag - The flag to set/clear (i.e., NTLMSSP_NEGOTIATE_OEM).
      value - Indicates whether to set (true) or clear (false) the specified flag.
    • toByteArray

      public abstract byte[] toByteArray() throws IOException
      Returns the raw byte representation of this message.
      Returns:
      A byte[] containing the raw message material.
      Throws:
      IOException - if an error occurs during message serialization