| <!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 (version 1.7.0_55) on Mon Sep 15 17:28:20 CEST 2014 --> |
| <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> |
| <title>NTLMUtilities (Apache MINA 2.0.8 API)</title> |
| <meta name="date" content="2014-09-15"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="NTLMUtilities (Apache MINA 2.0.8 API)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><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="strong">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><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></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="strong">NTLMUtilities</span> |
| extends <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> |
| 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="strong">Since:</span></dt> |
| <dd>MINA 2.0.0-M3</dd> |
| <dt><span class="strong">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="overviewSummary" 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><strong><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#NTLMUtilities()">NTLMUtilities</a></strong>()</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="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#createType1Message(java.lang.String, java.lang.String, java.lang.Integer, byte[])">createType1Message</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> workStation, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> domain, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a> customFlags, |
| byte[] osVersion)</code> |
| <div class="block">see http://davenport.sourceforge.net/ntlm.html#theType1Message</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#createType3Message(java.lang.String, java.lang.String, byte[], java.lang.String, java.lang.String, java.lang.Integer, byte[])">createType3Message</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> user, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> password, |
| byte[] challenge, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> target, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> workstation, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a> serverFlags, |
| byte[] osVersion)</code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#extractChallengeFromType2Message(byte[])">extractChallengeFromType2Message</a></strong>(byte[] msg)</code> |
| <div class="block">Extracts the NTLM challenge from the type 2 message as an 8 byte array.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#extractFlagsFromType2Message(byte[])">extractFlagsFromType2Message</a></strong>(byte[] msg)</code> |
| <div class="block">Extracts the NTLM flags from the type 2 message.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#extractTargetInfoFromType2Message(byte[], java.lang.Integer)">extractTargetInfoFromType2Message</a></strong>(byte[] msg, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a> msgFlags)</code> |
| <div class="block">Extracts the target information block from the type 2 message.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#extractTargetNameFromType2Message(byte[], java.lang.Integer)">extractTargetNameFromType2Message</a></strong>(byte[] msg, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a> msgFlags)</code> |
| <div class="block">Extracts the target name from the type 2 message.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#getOsVersion()">getOsVersion</a></strong>()</code> |
| <div class="block">Tries to return a valid OS version on Windows systems.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#printTargetInformationBlockFromType2Message(byte[], java.lang.Integer, java.io.PrintWriter)">printTargetInformationBlockFromType2Message</a></strong>(byte[] msg, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a> msgFlags, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/PrintWriter.html?is-external=true" title="class or interface in java.io">PrintWriter</a> out)</code> |
| <div class="block">Prints to the <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/PrintWriter.html?is-external=true" title="class or interface in java.io"><code>PrintWriter</code></a> the target information block extracted |
| from the type 2 message.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#readSecurityBufferTarget(byte[], int)">readSecurityBufferTarget</a></strong>(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 class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#writeOSVersion(byte, byte, short, byte[], int)">writeOSVersion</a></strong>(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 class="altColor"> |
| <td class="colFirst"><code>static byte[]</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#writeSecurityBuffer(short, int)">writeSecurityBuffer</a></strong>(short length, |
| int bufferOffset)</code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#writeSecurityBuffer(short, short, int, byte[], int)">writeSecurityBuffer</a></strong>(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 class="altColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#writeSecurityBufferAndUpdatePointer(java.io.ByteArrayOutputStream, short, int)">writeSecurityBufferAndUpdatePointer</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/ByteArrayOutputStream.html?is-external=true" title="class or interface in java.io">ByteArrayOutputStream</a> 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.<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></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="strong">See Also:</span></dt><dd><a href="../../../../../../../org/apache/mina/proxy/handlers/http/ntlm/NTLMUtilities.html#writeSecurityBuffer(short, short, int, byte[], int)"><code>writeSecurityBuffer(short, short, int, byte[], int)</code></a></dd></dl> |
| </li> |
| </ul> |
| <a name="writeSecurityBuffer(short, short, int, byte[], 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="strong">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[], 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="strong">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="strong">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> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>createType1Message</h4> |
| <pre>public static final byte[] createType1Message(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> workStation, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> domain, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a> customFlags, |
| byte[] osVersion)</pre> |
| <div class="block">see http://davenport.sourceforge.net/ntlm.html#theType1Message</div> |
| <dl><dt><span class="strong">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="strong">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(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/ByteArrayOutputStream.html?is-external=true" title="class or interface in java.io">ByteArrayOutputStream</a> baos, |
| short len, |
| int pointer) |
| throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></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="strong">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="strong">Returns:</span></dt><dd>the position where the next security buffer will be written</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if writing to the ByteArrayOutputStream fails</dd></dl> |
| </li> |
| </ul> |
| <a name="extractChallengeFromType2Message(byte[])"> |
| <!-- --> |
| </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="strong">Parameters:</span></dt><dd><code>msg</code> - the type 2 message byte array</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the challenge</dd></dl> |
| </li> |
| </ul> |
| <a name="extractFlagsFromType2Message(byte[])"> |
| <!-- --> |
| </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="strong">Parameters:</span></dt><dd><code>msg</code> - the type 2 message byte array</dd> |
| <dt><span class="strong">Returns:</span></dt><dd>the proxy flags as an int</dd></dl> |
| </li> |
| </ul> |
| <a name="readSecurityBufferTarget(byte[], 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="strong">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="strong">Returns:</span></dt><dd>a new byte array holding the data pointed by the security buffer</dd></dl> |
| </li> |
| </ul> |
| <a name="extractTargetNameFromType2Message(byte[], java.lang.Integer)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>extractTargetNameFromType2Message</h4> |
| <pre>public static final <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> extractTargetNameFromType2Message(byte[] msg, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a> msgFlags) |
| throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></pre> |
| <div class="block">Extracts the target name from the type 2 message.</div> |
| <dl><dt><span class="strong">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="strong">Returns:</span></dt><dd>the target name</dd> |
| <dt><span class="strong">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></code> - if unable to use the |
| needed UTF-16LE or ASCII charsets</dd></dl> |
| </li> |
| </ul> |
| <a name="extractTargetInfoFromType2Message(byte[], java.lang.Integer)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>extractTargetInfoFromType2Message</h4> |
| <pre>public static final byte[] extractTargetInfoFromType2Message(byte[] msg, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a> msgFlags)</pre> |
| <div class="block">Extracts the target information block from the type 2 message.</div> |
| <dl><dt><span class="strong">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="strong">Returns:</span></dt><dd>the target info</dd></dl> |
| </li> |
| </ul> |
| <a name="printTargetInformationBlockFromType2Message(byte[], java.lang.Integer, java.io.PrintWriter)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>printTargetInformationBlockFromType2Message</h4> |
| <pre>public static final void printTargetInformationBlockFromType2Message(byte[] msg, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a> msgFlags, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/PrintWriter.html?is-external=true" title="class or interface in java.io">PrintWriter</a> out) |
| throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></pre> |
| <div class="block">Prints to the <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/PrintWriter.html?is-external=true" title="class or interface in java.io"><code>PrintWriter</code></a> the target information block extracted |
| from the type 2 message.</div> |
| <dl><dt><span class="strong">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="strong">Throws:</span></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/UnsupportedEncodingException.html?is-external=true" title="class or interface in java.io">UnsupportedEncodingException</a></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[], java.lang.String, java.lang.String, java.lang.Integer, byte[])"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>createType3Message</h4> |
| <pre>public static final byte[] createType3Message(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> user, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> password, |
| byte[] challenge, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> target, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> workstation, |
| <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a> serverFlags, |
| byte[] osVersion)</pre> |
| <dl><dt><span class="strong">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="strong">Returns:</span></dt><dd>the type 3 message</dd><dt><span class="strong">See Also:</span></dt><dd><a |
| href="http://davenport.sourceforge.net/ntlm.html#theType3Message">NTLM |
| message type</a></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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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="strong">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–2014 <a href="http://mina.apache.org/">Apache MINA Project</a>. All rights reserved.</small></p> |
| </body> |
| </html> |