/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * 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; }
/** * Returns the default flags for a Type-3 message created in response * to the given Type-2 message in the current environment. * * @return An <code>int</code> containing the default flags. */ public static int getDefaultFlags(Type2Message type2) { if (type2 == null) return DEFAULT_FLAGS; int flags = NTLMSSP_NEGOTIATE_NTLM; flags |= ((type2.getFlags() & NTLMSSP_NEGOTIATE_UNICODE) != 0) ? NTLMSSP_NEGOTIATE_UNICODE : NTLMSSP_NEGOTIATE_OEM; return flags; }
/** * 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))); }
/** * 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))); }
/** * 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))); }
/** * 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))); }
/** * 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 ) )); }
/** * 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 default flags for a Type-2 message created in response * to the given Type-1 message in the current environment. * * @return An <code>int</code> containing the default flags. */ public static int getDefaultFlags(Type1Message type1) { if (type1 == null) return DEFAULT_FLAGS; int flags = NTLMSSP_NEGOTIATE_NTLM; int type1Flags = type1.getFlags(); flags |= ((type1Flags & NTLMSSP_NEGOTIATE_UNICODE) != 0) ? NTLMSSP_NEGOTIATE_UNICODE : NTLMSSP_NEGOTIATE_OEM; if ((type1Flags & NTLMSSP_REQUEST_TARGET) != 0) { String domain = getDefaultDomain(); if (domain != null) { flags |= NTLMSSP_REQUEST_TARGET | NTLMSSP_TARGET_TYPE_DOMAIN; } } return flags; }
public String toString() { String suppliedDomain = getSuppliedDomain(); String suppliedWorkstation = getSuppliedWorkstation(); return "Type1Message[suppliedDomain=" + (suppliedDomain == null ? "null" : suppliedDomain) + ",suppliedWorkstation=" + (suppliedWorkstation == null ? "null" : suppliedWorkstation) + ",flags=0x" + jcifs.util.Hexdump.toHexString(getFlags(), 8) + "]"; }
String suppliedDomain = getSuppliedDomain(); String suppliedWorkstation = getSuppliedWorkstation(); int flags = getFlags(); boolean hostInfo = false; byte[] domain = new byte[0];
public String toString() { String target = getTarget(); byte[] challenge = getChallenge(); byte[] context = getContext(); byte[] targetInformation = getTargetInformation(); return "Type2Message[target=" + target + ",challenge=" + (challenge == null ? "null" : "<" + challenge.length + " bytes>") + ",context=" + (context == null ? "null" : "<" + context.length + " bytes>") + ",targetInformation=" + (targetInformation == null ? "null" : "<" + targetInformation.length + " bytes>") + ",flags=0x" + jcifs.util.Hexdump.toHexString(getFlags(), 8) + "]"; }
int flags = type3Message.getFlags(); NTLMKeyFactory ntlmKeyFactory = new NTLMKeyFactory(); byte[] secondayMasterKey;
public String toString() { String user = getUser(); String domain = getDomain(); String workstation = getWorkstation(); byte[] lmResponse = getLMResponse(); byte[] ntResponse = getNTResponse(); byte[] sessionKey = getSessionKey(); return "Type3Message[domain=" + domain + ",user=" + user + ",workstation=" + workstation + ",lmResponse=" + (lmResponse == null ? "null" : "<" + lmResponse.length + " bytes>") + ",ntResponse=" + (ntResponse == null ? "null" : "<" + ntResponse.length + " bytes>") + ",sessionKey=" + (sessionKey == null ? "null" : "<" + sessionKey.length + " bytes>") + ",flags=0x" + jcifs.util.Hexdump.toHexString(getFlags(), 8) + "]"; }
ntlmsspFlags &= msg2.getFlags();