/** * Creates a Type-2 message in response to the given Type-1 message. * * @param type1 The Type-1 message which this represents a response to. * @param challenge The challenge from the domain controller/server. * @param target The authentication target. */ public Type2Message(Type1Message type1, byte[] challenge, String target) { this(getDefaultFlags(type1), challenge, (type1 != null && target == null && type1.getFlag(NTLMSSP_REQUEST_TARGET)) ? getDefaultDomain() : target); }
/** * Creates a Type-2 message in response to the given Type-1 message. * * @param type1 The Type-1 message which this represents a response to. * @param challenge The challenge from the domain controller/server. * @param target The authentication target. */ public Type2Message(Type1Message type1, byte[] challenge, String target) { this(getDefaultFlags(type1), challenge, (type1 != null && target == null && type1.getFlag(NTLMSSP_REQUEST_TARGET)) ? getDefaultDomain() : target); }
/** * Creates a Type-3 message using default values from the current * environment. */ public Type3Message() { setFlags(getDefaultFlags()); setDomain(getDefaultDomain()); setUser(getDefaultUser()); setWorkstation(getDefaultWorkstation()); }
/** * Creates a Type-3 message using default values from the current * environment. */ public Type3Message() { setFlags(getDefaultFlags()); setDomain(getDefaultDomain()); setUser(getDefaultUser()); setWorkstation(getDefaultWorkstation()); }
/** * Creates a Type-2 message with the specified parameters. * * @param flags The flags to apply to this message. * @param challenge The challenge from the domain controller/server. * @param target The authentication target. */ public Type2Message(int flags, byte[] challenge, String target) { setFlags(flags); setChallenge(challenge); setTarget(target); if (target != null) setTargetInformation(getDefaultTargetInformation()); }
/** * Creates a Type-1 message using default values from the current * environment. */ public Type1Message() { this(getDefaultFlags(), getDefaultDomain(), getDefaultWorkstation()); }
/** * Sets or clears the specified flag. * * @param flag The flag to set/clear (i.e., * <code>NTLMSSP_NEGOTIATE_OEM</code>). * @param value Indicates whether to set (<code>true</code>) or * clear (<code>false</code>) the specified flag. */ public void setFlag(int flag, boolean value) { setFlags(value ? (getFlags() | flag) : (getFlags() & (0xffffffff ^ flag))); }
/** * Returns the status of the specified flag. * * @param flag * The flag to test (i.e., <code>NTLMSSP_NEGOTIATE_OEM</code>). * @return A <code>boolean</code> indicating whether the flag is set. */ public boolean getFlag ( int flag ) { return ( getFlags() & flag ) != 0; }
/** * Creates a Type-3 message using the given raw Type-3 material. * * @param material The raw Type-3 material used to construct this message. * @throws IOException If an error occurs while parsing the material. */ public Type3Message(byte[] material) throws IOException { parse(material); }
/** * Creates a Type-2 message using default values from the current * environment. */ public Type2Message() { this(getDefaultFlags(), null, null); }
/** * Creates a Type-1 message using the given raw Type-1 material. * * @param material The raw Type-1 material used to construct this message. * @throws IOException If an error occurs while parsing the material. */ public Type1Message(byte[] material) throws IOException { parse(material); }
/** * Creates a Type-2 message using the given raw Type-2 material. * * @param material The raw Type-2 material used to construct this message. * @throws IOException If an error occurs while parsing the material. */ public Type2Message(byte[] material) throws IOException { parse(material); }
/** * Creates a Type-3 message using default values from the current * environment. */ public Type3Message() { setFlags(getDefaultFlags()); setDomain(getDefaultDomain()); setUser(getDefaultUser()); setWorkstation(getDefaultWorkstation()); }
/** * Creates a Type-2 message in response to the given Type-1 message. * * @param type1 The Type-1 message which this represents a response to. * @param challenge The challenge from the domain controller/server. * @param target The authentication target. */ public Type2Message(Type1Message type1, byte[] challenge, String target) { this(getDefaultFlags(type1), challenge, (type1 != null && target == null && type1.getFlag(NTLMSSP_REQUEST_TARGET)) ? getDefaultDomain() : target); }
/** * Creates a Type-1 message using default values from the current * environment. */ public Type1Message() { this(getDefaultFlags(), getDefaultDomain(), getDefaultWorkstation()); }
/** * Sets or clears the specified flag. * * @param flag The flag to set/clear (i.e., * <code>NTLMSSP_NEGOTIATE_OEM</code>). * @param value Indicates whether to set (<code>true</code>) or * clear (<code>false</code>) the specified flag. */ public void setFlag(int flag, boolean value) { setFlags(value ? (getFlags() | flag) : (getFlags() & (0xffffffff ^ flag))); }
/** * Returns the status of the specified flag. * * @param flag The flag to test (i.e., <code>NTLMSSP_NEGOTIATE_OEM</code>). * @return A <code>boolean</code> indicating whether the flag is set. */ public boolean getFlag(int flag) { return (getFlags() & flag) != 0; }
/** * Creates a Type-3 message using the given raw Type-3 material. * * @param material The raw Type-3 material used to construct this message. * @throws IOException If an error occurs while parsing the material. */ public Type3Message(byte[] material) throws IOException { parse(material); }
/** * Creates a Type-2 message using default values from the current * environment. */ public Type2Message() { this(getDefaultFlags(), null, null); }
/** * Creates a Type-2 message in response to the given Type-1 message. * * @param type1 The Type-1 message which this represents a response to. * @param challenge The challenge from the domain controller/server. * @param target The authentication target. */ public Type2Message(Type1Message type1, byte[] challenge, String target) { this(getDefaultFlags(type1), challenge, (type1 != null && target == null && type1.getFlag(NTLMSSP_REQUEST_TARGET)) ? getDefaultDomain() : target); }