| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_191) on Sat Mar 16 23:01:39 CET 2019 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>NTLMUtilities (Apache MINA 2.0.1 API Documentation)</title> |
| <meta name="date" content="2019-03-16"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="NTLMUtilities (Apache MINA 2.0.1 API Documentation)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/NTLMUtilities.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMResponses.html" title="class in org.apache.mina.proxy.handlers.http.ntlm"><span class="typeNameLink">Prev Class</span></a></li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../../index.html?org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html" target="_top">Frames</a></li> |
| <li><a href="NTLMUtilities.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.mina.proxy.handlers.http.ntlm</div> |
| <h2 title="Class NTLMUtilities" class="title">Class NTLMUtilities</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li>java.lang.Object</li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.mina.proxy.handlers.http.ntlm.NTLMUtilities</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html" title="interface in org.apache.mina.proxy.handlers.http.ntlm">NTLMConstants</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">NTLMUtilities</span> |
| extends java.lang.Object |
| implements <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html" title="interface in org.apache.mina.proxy.handlers.http.ntlm">NTLMConstants</a></pre> |
| <div class="block">NTLMUtilities.java - NTLM functions used for authentication and unit testing.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>MINA 2.0.0-M3</dd> |
| <dt><span class="simpleTagLabel">Author:</span></dt> |
| <dd><a href="http://mina.apache.org">Apache MINA Project</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <ul class="blockList"> |
| <li class="blockList"><a name="fields.inherited.from.class.org.apache.mina.proxy.handlers.http.ntlm.NTLMConstants"> |
| <!-- --> |
| </a> |
| <h3>Fields inherited from interface org.apache.mina.proxy.handlers.http.ntlm.<a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html" title="interface in org.apache.mina.proxy.handlers.http.ntlm">NTLMConstants</a></h3> |
| <code><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#DEFAULT_FLAGS">DEFAULT_FLAGS</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#DEFAULT_OS_VERSION">DEFAULT_OS_VERSION</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_NEGOTIATE_128_BIT_ENCRYPTION">FLAG_NEGOTIATE_128_BIT_ENCRYPTION</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_NEGOTIATE_56_BIT_ENCRYPTION">FLAG_NEGOTIATE_56_BIT_ENCRYPTION</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_NEGOTIATE_ALWAYS_SIGN">FLAG_NEGOTIATE_ALWAYS_SIGN</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_NEGOTIATE_ANONYMOUS">FLAG_NEGOTIATE_ANONYMOUS</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_NEGOTIATE_DATAGRAM_STYLE">FLAG_NEGOTIATE_DATAGRAM_STYLE</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_NEGOTIATE_DOMAIN_SUPPLIED">FLAG_NEGOTIATE_DOMAIN_SUPPLIED</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_NEGOTIATE_KEY_EXCHANGE">FLAG_NEGOTIATE_KEY_EXCHANGE</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_NEGOTIATE_LAN_MANAGER_KEY">FLAG_NEGOTIATE_LAN_MANAGER_KEY</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_NEGOTIATE_LOCAL_CALL">FLAG_NEGOTIATE_LOCAL_CALL</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_NEGOTIATE_NTLM">FLAG_NEGOTIATE_NTLM</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_NEGOTIATE_NTLM2">FLAG_NEGOTIATE_NTLM2</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_NEGOTIATE_OEM">FLAG_NEGOTIATE_OEM</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_NEGOTIATE_SEAL">FLAG_NEGOTIATE_SEAL</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_NEGOTIATE_SIGN">FLAG_NEGOTIATE_SIGN</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_NEGOTIATE_TARGET_INFO">FLAG_NEGOTIATE_TARGET_INFO</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_NEGOTIATE_UNICODE">FLAG_NEGOTIATE_UNICODE</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_NEGOTIATE_WORKSTATION_SUPPLIED">FLAG_NEGOTIATE_WORKSTATION_SUPPLIED</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_REQUEST_SERVER_AUTH_REALM">FLAG_REQUEST_SERVER_AUTH_REALM</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_TARGET_TYPE_DOMAIN">FLAG_TARGET_TYPE_DOMAIN</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_TARGET_TYPE_SERVER">FLAG_TARGET_TYPE_SERVER</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_TARGET_TYPE_SHARE">FLAG_TARGET_TYPE_SHARE</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_UNIDENTIFIED_1">FLAG_UNIDENTIFIED_1</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_UNIDENTIFIED_10">FLAG_UNIDENTIFIED_10</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_UNIDENTIFIED_11">FLAG_UNIDENTIFIED_11</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_UNIDENTIFIED_2">FLAG_UNIDENTIFIED_2</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_UNIDENTIFIED_3">FLAG_UNIDENTIFIED_3</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_UNIDENTIFIED_4">FLAG_UNIDENTIFIED_4</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_UNIDENTIFIED_5">FLAG_UNIDENTIFIED_5</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_UNIDENTIFIED_6">FLAG_UNIDENTIFIED_6</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_UNIDENTIFIED_7">FLAG_UNIDENTIFIED_7</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_UNIDENTIFIED_8">FLAG_UNIDENTIFIED_8</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#FLAG_UNIDENTIFIED_9">FLAG_UNIDENTIFIED_9</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#MESSAGE_TYPE_1">MESSAGE_TYPE_1</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#MESSAGE_TYPE_2">MESSAGE_TYPE_2</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#MESSAGE_TYPE_3">MESSAGE_TYPE_3</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#NTLM_SIGNATURE">NTLM_SIGNATURE</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#TARGET_INFORMATION_SUBBLOCK_DNS_DOMAIN_NAME_TYPE">TARGET_INFORMATION_SUBBLOCK_DNS_DOMAIN_NAME_TYPE</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#TARGET_INFORMATION_SUBBLOCK_DOMAIN_TYPE">TARGET_INFORMATION_SUBBLOCK_DOMAIN_TYPE</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#TARGET_INFORMATION_SUBBLOCK_FQDNS_HOSTNAME_TYPE">TARGET_INFORMATION_SUBBLOCK_FQDNS_HOSTNAME_TYPE</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#TARGET_INFORMATION_SUBBLOCK_PARENT_DNS_DOMAIN_NAME_TYPE">TARGET_INFORMATION_SUBBLOCK_PARENT_DNS_DOMAIN_NAME_TYPE</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#TARGET_INFORMATION_SUBBLOCK_SERVER_TYPE">TARGET_INFORMATION_SUBBLOCK_SERVER_TYPE</a>, <a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMConstants.html#TARGET_INFORMATION_SUBBLOCK_TERMINATOR_TYPE">TARGET_INFORMATION_SUBBLOCK_TERMINATOR_TYPE</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#NTLMUtilities--">NTLMUtilities</a></span>()</code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#createType1Message-java.lang.String-java.lang.String-java.lang.Integer-byte:A-">createType1Message</a></span>(java.lang.String workStation, |
| java.lang.String domain, |
| java.lang.Integer customFlags, |
| byte[] osVersion)</code> |
| <div class="block">see http://davenport.sourceforge.net/ntlm.html#theType1Message</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#createType3Message-java.lang.String-java.lang.String-byte:A-java.lang.String-java.lang.String-java.lang.Integer-byte:A-">createType3Message</a></span>(java.lang.String user, |
| java.lang.String password, |
| byte[] challenge, |
| java.lang.String target, |
| java.lang.String workstation, |
| java.lang.Integer serverFlags, |
| byte[] osVersion)</code> </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#extractChallengeFromType2Message-byte:A-">extractChallengeFromType2Message</a></span>(byte[] msg)</code> |
| <div class="block">Extracts the NTLM challenge from the type 2 message as an 8 byte array.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#extractFlagsFromType2Message-byte:A-">extractFlagsFromType2Message</a></span>(byte[] msg)</code> |
| <div class="block">Extracts the NTLM flags from the type 2 message.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#extractTargetInfoFromType2Message-byte:A-java.lang.Integer-">extractTargetInfoFromType2Message</a></span>(byte[] msg, |
| java.lang.Integer msgFlags)</code> |
| <div class="block">Extracts the target information block from the type 2 message.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static java.lang.String</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#extractTargetNameFromType2Message-byte:A-java.lang.Integer-">extractTargetNameFromType2Message</a></span>(byte[] msg, |
| java.lang.Integer msgFlags)</code> |
| <div class="block">Extracts the target name from the type 2 message.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#getOsVersion--">getOsVersion</a></span>()</code> |
| <div class="block">Tries to return a valid OS version on Windows systems.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#printTargetInformationBlockFromType2Message-byte:A-java.lang.Integer-java.io.PrintWriter-">printTargetInformationBlockFromType2Message</a></span>(byte[] msg, |
| java.lang.Integer msgFlags, |
| java.io.PrintWriter out)</code> |
| <div class="block">Prints to the <code>PrintWriter</code> the target information block extracted |
| from the type 2 message.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#readSecurityBufferTarget-byte:A-int-">readSecurityBufferTarget</a></span>(byte[] msg, |
| int securityBufferOffset)</code> |
| <div class="block">Reads the byte array described by the security buffer stored at the |
| <code>securityBufferOffset</code> offset.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#writeOSVersion-byte-byte-short-byte:A-int-">writeOSVersion</a></span>(byte majorVersion, |
| byte minorVersion, |
| short buildNumber, |
| byte[] b, |
| int offset)</code> |
| <div class="block">Writes the Windows OS version passed in as three byte values |
| (majorVersion.minorVersion.buildNumber) to the given byte array |
| at <code>offset</code>.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#writeSecurityBuffer-short-int-">writeSecurityBuffer</a></span>(short length, |
| int bufferOffset)</code> </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#writeSecurityBuffer-short-short-int-byte:A-int-">writeSecurityBuffer</a></span>(short length, |
| short allocated, |
| int bufferOffset, |
| byte[] b, |
| int offset)</code> |
| <div class="block">Writes a security buffer to the given array <code>b</code> at offset |
| <code>offset</code>.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#writeSecurityBufferAndUpdatePointer-java.io.ByteArrayOutputStream-short-int-">writeSecurityBufferAndUpdatePointer</a></span>(java.io.ByteArrayOutputStream baos, |
| short len, |
| int pointer)</code> |
| <div class="block">Writes a security buffer and returns the pointer of the position |
| where to write the next security buffer.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.Object</h3> |
| <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="NTLMUtilities--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>NTLMUtilities</h4> |
| <pre>public NTLMUtilities()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="writeSecurityBuffer-short-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writeSecurityBuffer</h4> |
| <pre>public static final byte[] writeSecurityBuffer(short length, |
| int bufferOffset)</pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#writeSecurityBuffer-short-short-int-byte:A-int-"><code>writeSecurityBuffer(short, short, int, byte[], int)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="writeSecurityBuffer-short-short-int-byte:A-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writeSecurityBuffer</h4> |
| <pre>public static final void writeSecurityBuffer(short length, |
| short allocated, |
| int bufferOffset, |
| byte[] b, |
| int offset)</pre> |
| <div class="block">Writes a security buffer to the given array <code>b</code> at offset |
| <code>offset</code>. A security buffer defines a pointer to an area |
| in the data that defines some data with a variable length. This allows |
| to have a semi-fixed length header thus making a little bit easier |
| the decoding process in the NTLM protocol.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>length</code> - the length of the security buffer</dd> |
| <dd><code>allocated</code> - the allocated space for the security buffer (should be |
| greater or equal to <code>length</code></dd> |
| <dd><code>bufferOffset</code> - the offset from the main array where the currently |
| defined security buffer will be written</dd> |
| <dd><code>b</code> - the buffer in which we write the security buffer</dd> |
| <dd><code>offset</code> - the offset at which to write to the b buffer</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="writeOSVersion-byte-byte-short-byte:A-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writeOSVersion</h4> |
| <pre>public static final void writeOSVersion(byte majorVersion, |
| byte minorVersion, |
| short buildNumber, |
| byte[] b, |
| int offset)</pre> |
| <div class="block">Writes the Windows OS version passed in as three byte values |
| (majorVersion.minorVersion.buildNumber) to the given byte array |
| at <code>offset</code>.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>majorVersion</code> - the major version number</dd> |
| <dd><code>minorVersion</code> - the minor version number</dd> |
| <dd><code>buildNumber</code> - the build number</dd> |
| <dd><code>b</code> - the target byte array</dd> |
| <dd><code>offset</code> - the offset at which to write in the array</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getOsVersion--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getOsVersion</h4> |
| <pre>public static final byte[] getOsVersion()</pre> |
| <div class="block">Tries to return a valid OS version on Windows systems. If it fails to |
| do so or if we're running on another OS then a fake Windows XP OS |
| version is returned because the protocol uses it.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a NTLM OS version byte buffer</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="createType1Message-java.lang.String-java.lang.String-java.lang.Integer-byte:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createType1Message</h4> |
| <pre>public static final byte[] createType1Message(java.lang.String workStation, |
| java.lang.String domain, |
| java.lang.Integer customFlags, |
| byte[] osVersion)</pre> |
| <div class="block">see http://davenport.sourceforge.net/ntlm.html#theType1Message</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>workStation</code> - the workstation name</dd> |
| <dd><code>domain</code> - the domain name</dd> |
| <dd><code>customFlags</code> - custom flags, if null then |
| <code>NTLMConstants.DEFAULT_CONSTANTS</code> is used</dd> |
| <dd><code>osVersion</code> - the os version of the client, if null then |
| <code>NTLMConstants.DEFAULT_OS_VERSION</code> is used</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the type 1 message</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="writeSecurityBufferAndUpdatePointer-java.io.ByteArrayOutputStream-short-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writeSecurityBufferAndUpdatePointer</h4> |
| <pre>public static final int writeSecurityBufferAndUpdatePointer(java.io.ByteArrayOutputStream baos, |
| short len, |
| int pointer) |
| throws java.io.IOException</pre> |
| <div class="block">Writes a security buffer and returns the pointer of the position |
| where to write the next security buffer.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>baos</code> - the stream where the security buffer is written</dd> |
| <dd><code>len</code> - the length of the security buffer</dd> |
| <dd><code>pointer</code> - the position where the security buffer can be written</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the position where the next security buffer will be written</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.IOException</code> - if writing to the ByteArrayOutputStream fails</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="extractChallengeFromType2Message-byte:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>extractChallengeFromType2Message</h4> |
| <pre>public static final byte[] extractChallengeFromType2Message(byte[] msg)</pre> |
| <div class="block">Extracts the NTLM challenge from the type 2 message as an 8 byte array.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>msg</code> - the type 2 message byte array</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the challenge</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="extractFlagsFromType2Message-byte:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>extractFlagsFromType2Message</h4> |
| <pre>public static final int extractFlagsFromType2Message(byte[] msg)</pre> |
| <div class="block">Extracts the NTLM flags from the type 2 message.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>msg</code> - the type 2 message byte array</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the proxy flags as an int</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="readSecurityBufferTarget-byte:A-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>readSecurityBufferTarget</h4> |
| <pre>public static final byte[] readSecurityBufferTarget(byte[] msg, |
| int securityBufferOffset)</pre> |
| <div class="block">Reads the byte array described by the security buffer stored at the |
| <code>securityBufferOffset</code> offset.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>msg</code> - the message where to read the security buffer and it's value</dd> |
| <dd><code>securityBufferOffset</code> - the offset at which to read the security buffer</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a new byte array holding the data pointed by the security buffer</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="extractTargetNameFromType2Message-byte:A-java.lang.Integer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>extractTargetNameFromType2Message</h4> |
| <pre>public static final java.lang.String extractTargetNameFromType2Message(byte[] msg, |
| java.lang.Integer msgFlags) |
| throws java.io.UnsupportedEncodingException</pre> |
| <div class="block">Extracts the target name from the type 2 message.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>msg</code> - the type 2 message byte array</dd> |
| <dd><code>msgFlags</code> - the flags if null then flags are extracted from the |
| type 2 message</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the target name</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.UnsupportedEncodingException</code> - if unable to use the |
| needed UTF-16LE or ASCII charsets</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="extractTargetInfoFromType2Message-byte:A-java.lang.Integer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>extractTargetInfoFromType2Message</h4> |
| <pre>public static final byte[] extractTargetInfoFromType2Message(byte[] msg, |
| java.lang.Integer msgFlags)</pre> |
| <div class="block">Extracts the target information block from the type 2 message.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>msg</code> - the type 2 message byte array</dd> |
| <dd><code>msgFlags</code> - the flags if null then flags are extracted from the |
| type 2 message</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the target info</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="printTargetInformationBlockFromType2Message-byte:A-java.lang.Integer-java.io.PrintWriter-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>printTargetInformationBlockFromType2Message</h4> |
| <pre>public static final void printTargetInformationBlockFromType2Message(byte[] msg, |
| java.lang.Integer msgFlags, |
| java.io.PrintWriter out) |
| throws java.io.UnsupportedEncodingException</pre> |
| <div class="block">Prints to the <code>PrintWriter</code> the target information block extracted |
| from the type 2 message.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>msg</code> - the type 2 message</dd> |
| <dd><code>msgFlags</code> - the flags if null then flags are extracted from the |
| type 2 message</dd> |
| <dd><code>out</code> - the output target for the information</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>java.io.UnsupportedEncodingException</code> - if unable to use the |
| needed UTF-16LE or ASCII charsets</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="createType3Message-java.lang.String-java.lang.String-byte:A-java.lang.String-java.lang.String-java.lang.Integer-byte:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>createType3Message</h4> |
| <pre>public static final byte[] createType3Message(java.lang.String user, |
| java.lang.String password, |
| byte[] challenge, |
| java.lang.String target, |
| java.lang.String workstation, |
| java.lang.Integer serverFlags, |
| byte[] osVersion)</pre> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>user</code> - the user name</dd> |
| <dd><code>password</code> - the user password</dd> |
| <dd><code>challenge</code> - the challenge response</dd> |
| <dd><code>target</code> - the target name</dd> |
| <dd><code>workstation</code> - the client workstation's name</dd> |
| <dd><code>serverFlags</code> - the flags set by the client</dd> |
| <dd><code>osVersion</code> - the os version of the client</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the type 3 message</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><code>http://davenport.sourceforge.net/ntlm.html#theType3Message</code></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/NTLMUtilities.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMResponses.html" title="class in org.apache.mina.proxy.handlers.http.ntlm"><span class="typeNameLink">Prev Class</span></a></li> |
| <li>Next Class</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../../index.html?org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html" target="_top">Frames</a></li> |
| <li><a href="NTLMUtilities.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2004-2019 <a href="http://mina.apache.org/">Apache MINA Project</a>. All Rights Reserved.</small></p> |
| </body> |
| </html> |