/** * Constructs the LanManager response to the given Type-2 message using * the supplied password. * * @param type2 The Type-2 message. * @param password The password. * @return A <code>byte[]</code> containing the LanManager response. */ public static byte[] getLMResponse(Type2Message type2, String password) { if (type2 == null || password == null) return null; return NtlmPasswordAuthentication.getPreNTLMResponse(password, type2.getChallenge()); }
/** * Constructs the LanManager response to the given Type-2 message using * the supplied password. * * @param type2 The Type-2 message. * @param password The password. * @return A <code>byte[]</code> containing the LanManager response. */ public static byte[] getLMResponse(Type2Message type2, String password) { if (type2 == null || password == null) return null; return NtlmPasswordAuthentication.getPreNTLMResponse(password, type2.getChallenge()); }
/** * Constructs the LanManager response to the given Type-2 message using * the supplied password. * * @param type2 The Type-2 message. * @param password The password. * @return A <code>byte[]</code> containing the LanManager response. */ public static byte[] getLMResponse(Type2Message type2, String password) { if (type2 == null || password == null) return null; return NtlmPasswordAuthentication.getPreNTLMResponse(password, type2.getChallenge()); }
/** * Constructs the LanManager response to the given Type-2 message using * the supplied password. * * @param type2 The Type-2 message. * @param password The password. * @return A <code>byte[]</code> containing the LanManager response. */ public static byte[] getLMResponse(Type2Message type2, String password) { if (type2 == null || password == null) return null; return NtlmPasswordAuthentication.getPreNTLMResponse(password, type2.getChallenge()); }
/** * Computes the 24 byte ANSI password hash given the 8 byte server challenge. */ public byte[] getAnsiHash( byte[] challenge ) { if( hashesExternal ) { return ansiHash; } switch (LM_COMPATIBILITY) { case 0: case 1: return getPreNTLMResponse( password, challenge ); case 2: return getNTLMResponse( password, challenge ); case 3: case 4: case 5: if( clientChallenge == null ) { clientChallenge = new byte[8]; RANDOM.nextBytes( clientChallenge ); } return getLMv2Response(domain, username, password, challenge, clientChallenge); default: return getPreNTLMResponse( password, challenge ); } } /**
/** * Computes the 24 byte ANSI password hash given the 8 byte server challenge. */ public byte[] getAnsiHash( byte[] challenge ) { if( hashesExternal ) { return ansiHash; } switch (LM_COMPATIBILITY) { case 0: case 1: return getPreNTLMResponse( password, challenge ); case 2: return getNTLMResponse( password, challenge ); case 3: case 4: case 5: if( clientChallenge == null ) { clientChallenge = new byte[8]; RANDOM.nextBytes( clientChallenge ); } return getLMv2Response(domain, username, password, challenge, clientChallenge); default: return getPreNTLMResponse( password, challenge ); } } /**
/** * Computes the 24 byte ANSI password hash given the 8 byte server challenge. */ public byte[] getAnsiHash( byte[] challenge ) { if( hashesExternal ) { return ansiHash; } switch (LM_COMPATIBILITY) { case 0: case 1: return getPreNTLMResponse( password, challenge ); case 2: return getNTLMResponse( password, challenge ); case 3: case 4: case 5: if( clientChallenge == null ) { clientChallenge = new byte[8]; RANDOM.nextBytes( clientChallenge ); } return getLMv2Response(domain, username, password, challenge, clientChallenge); default: return getPreNTLMResponse( password, challenge ); } } /**
/** * Computes the 24 byte ANSI password hash given the 8 byte server challenge. */ public byte[] getAnsiHash( byte[] challenge ) { if( hashesExternal ) { return ansiHash; } switch (LM_COMPATIBILITY) { case 0: case 1: return getPreNTLMResponse( password, challenge ); case 2: return getNTLMResponse( password, challenge ); case 3: case 4: case 5: if( clientChallenge == null ) { clientChallenge = new byte[8]; RANDOM.nextBytes( clientChallenge ); } return getLMv2Response(domain, username, password, challenge, clientChallenge); default: return getPreNTLMResponse( password, challenge ); } } /**
byte[] lmResponse = NtlmPasswordAuthentication.getPreNTLMResponse( credentials.getPassword(), challenge); byte[] ntResponse = NtlmPasswordAuthentication.getNTLMResponse(
final byte[] lmResponse = NtlmPasswordAuthentication.getPreNTLMResponse ( this.credentials.getPassword (), challenge ); final byte[] ntResponse = NtlmPasswordAuthentication.getNTLMResponse ( this.credentials.getPassword (), challenge ); type3 = new Type3Message ( flags, lmResponse, ntResponse, target, this.credentials.getUsername (), Type3Message.getDefaultWorkstation () );
byte[] lmResponse = NtlmPasswordAuthentication.getPreNTLMResponse( credentials.getPassword(), challenge); byte[] ntResponse = NtlmPasswordAuthentication.getNTLMResponse(