/** * Returns the effective user session key. * * @param challenge The server challenge. * @return A <code>byte[]</code> containing the effective user session key, * used in SMB MAC signing and NTLMSSP signing and sealing. */ public byte[] getUserSessionKey(byte[] challenge) { if (hashesExternal) return null; byte[] key = new byte[16]; try { getUserSessionKey(challenge, key, 0); } catch (Exception ex) { if( log.level > 0 ) ex.printStackTrace( log ); } return key; }
/** * Returns the effective user session key. * * @param challenge The server challenge. * @return A <code>byte[]</code> containing the effective user session key, * used in SMB MAC signing and NTLMSSP signing and sealing. */ public byte[] getUserSessionKey(byte[] challenge) { if (hashesExternal) return null; byte[] key = new byte[16]; try { getUserSessionKey(challenge, key, 0); } catch (Exception ex) { if( log.level > 0 ) ex.printStackTrace( log ); } return key; }
/** * Returns the effective user session key. * * @param challenge The server challenge. * @return A <code>byte[]</code> containing the effective user session key, * used in SMB MAC signing and NTLMSSP signing and sealing. */ public byte[] getUserSessionKey(byte[] challenge) { if (hashesExternal) return null; byte[] key = new byte[16]; try { getUserSessionKey(challenge, key, 0); } catch (Exception ex) { if( log.level > 0 ) ex.printStackTrace( log ); } return key; }
/** * Returns the effective user session key. * * @param challenge The server challenge. * @return A <code>byte[]</code> containing the effective user session key, * used in SMB MAC signing and NTLMSSP signing and sealing. */ public byte[] getUserSessionKey(byte[] challenge) { if (hashesExternal) return null; byte[] key = new byte[16]; try { getUserSessionKey(challenge, key, 0); } catch (Exception ex) { if( log.level > 0 ) ex.printStackTrace( log ); } return key; }
public byte[] getSigningKey(byte[] challenge) throws SmbException { switch (LM_COMPATIBILITY) { case 0: case 1: case 2: byte[] signingKey = new byte[40]; getUserSessionKey(challenge, signingKey, 0); System.arraycopy(getUnicodeHash(challenge), 0, signingKey, 16, 24); return signingKey; case 3: case 4: case 5: /* This code is only called if extended security is not on. This will * all be cleaned up an normalized in JCIFS 2.x. */ throw new SmbException("NTLMv2 requires extended security (jcifs.smb.client.useExtendedSecurity must be true if jcifs.smb.lmCompatibility >= 3)"); } return null; }
public byte[] getSigningKey(byte[] challenge) throws SmbException { switch (LM_COMPATIBILITY) { case 0: case 1: case 2: byte[] signingKey = new byte[40]; getUserSessionKey(challenge, signingKey, 0); System.arraycopy(getUnicodeHash(challenge), 0, signingKey, 16, 24); return signingKey; case 3: case 4: case 5: /* This code is only called if extended security is not on. This will * all be cleaned up an normalized in JCIFS 2.x. */ throw new SmbException("NTLMv2 requires extended security (jcifs.smb.client.useExtendedSecurity must be true if jcifs.smb.lmCompatibility >= 3)"); } return null; }
public byte[] getSigningKey(byte[] challenge) throws SmbException { switch (LM_COMPATIBILITY) { case 0: case 1: case 2: byte[] signingKey = new byte[40]; getUserSessionKey(challenge, signingKey, 0); System.arraycopy(getUnicodeHash(challenge), 0, signingKey, 16, 24); return signingKey; case 3: case 4: case 5: /* This code is only called if extended security is not on. This will * all be cleaned up an normalized in JCIFS 2.x. */ throw new SmbException("NTLMv2 requires extended security (jcifs.smb.client.useExtendedSecurity must be true if jcifs.smb.lmCompatibility >= 3)"); } return null; }
public byte[] getSigningKey(byte[] challenge) throws SmbException { switch (LM_COMPATIBILITY) { case 0: case 1: case 2: byte[] signingKey = new byte[40]; getUserSessionKey(challenge, signingKey, 0); System.arraycopy(getUnicodeHash(challenge), 0, signingKey, 16, 24); return signingKey; case 3: case 4: case 5: /* This code is only called if extended security is not on. This will * all be cleaned up an normalized in JCIFS 2.x. */ throw new SmbException("NTLMv2 requires extended security (jcifs.smb.client.useExtendedSecurity must be true if jcifs.smb.lmCompatibility >= 3)"); } return null; }
case 2: macSigningKey = new byte[40]; auth.getUserSessionKey(transport.server.encryptionKey, macSigningKey, 0); System.arraycopy(auth.getUnicodeHash(transport.server.encryptionKey), 0, macSigningKey, 16, 24); case 5: macSigningKey = new byte[16]; auth.getUserSessionKey(transport.server.encryptionKey, macSigningKey, 0); break; default: macSigningKey = new byte[40]; auth.getUserSessionKey(transport.server.encryptionKey, macSigningKey, 0); System.arraycopy(auth.getUnicodeHash(transport.server.encryptionKey), 0, macSigningKey, 16, 24);
case 2: macSigningKey = new byte[40]; auth.getUserSessionKey(transport.server.encryptionKey, macSigningKey, 0); System.arraycopy(auth.getUnicodeHash(transport.server.encryptionKey), 0, macSigningKey, 16, 24); case 5: macSigningKey = new byte[16]; auth.getUserSessionKey(transport.server.encryptionKey, macSigningKey, 0); break; default: macSigningKey = new byte[40]; auth.getUserSessionKey(transport.server.encryptionKey, macSigningKey, 0); System.arraycopy(auth.getUnicodeHash(transport.server.encryptionKey), 0, macSigningKey, 16, 24);
case 2: macSigningKey = new byte[40]; auth.getUserSessionKey(transport.server.encryptionKey, macSigningKey, 0); System.arraycopy(auth.getUnicodeHash(transport.server.encryptionKey), 0, macSigningKey, 16, 24); case 5: macSigningKey = new byte[16]; auth.getUserSessionKey(transport.server.encryptionKey, macSigningKey, 0); break; default: macSigningKey = new byte[40]; auth.getUserSessionKey(transport.server.encryptionKey, macSigningKey, 0); System.arraycopy(auth.getUnicodeHash(transport.server.encryptionKey), 0, macSigningKey, 16, 24);
case 2: macSigningKey = new byte[40]; auth.getUserSessionKey(transport.server.encryptionKey, macSigningKey, 0); System.arraycopy(auth.getUnicodeHash(transport.server.encryptionKey), 0, macSigningKey, 16, 24); case 5: macSigningKey = new byte[16]; auth.getUserSessionKey(transport.server.encryptionKey, macSigningKey, 0); break; default: macSigningKey = new byte[40]; auth.getUserSessionKey(transport.server.encryptionKey, macSigningKey, 0); System.arraycopy(auth.getUnicodeHash(transport.server.encryptionKey), 0, macSigningKey, 16, 24);