Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
jTDS JDBC Driver Source Code Files
jTDS JDBC Driver Source Code Files are provided in the
source package file, jtds-1.3.1-fyi.zip.
You can browse jTDS JDBC Driver Source Code files below:
✍: FYIcenter.com
⏎ net/sourceforge/jtds/util/SSPIJNIClient.java
// jTDS JDBC Driver for Microsoft SQL Server and Sybase // Copyright (C) 2004 The jTDS Project // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // package net.sourceforge.jtds.util; import java.sql.SQLException; /** * A JNI client to SSPI based CPP program (DLL) that returns the user * credentials for NTLM authentication. * <p/> * The DLL name is ntlmauth.dll. * * @author Magendran Sathaiah (mahi@aztec.soft.net) */ public class SSPIJNIClient { /** Singleton instance. */ private static SSPIJNIClient thisInstance; /** SSPI native library loaded flag. */ private static boolean libraryLoaded; /** SSPI client initialized flag. */ private boolean initialized; /** Initializes the SSPI client. */ private native void initialize(); /** Uninitializes the SSPI client. */ private native void unInitialize(); /** * Prepares the NTLM TYPE-1 message and returns it as a * <code>byte[]</code>. */ private native byte[] prepareSSORequest(); /** * Prepares the NTLM TYPE-3 message using the current user's credentials. * <p> * It needs the challenge BLOB and it's size as input. The challenge BLOB * is nothig but the TYPE-2 message that is received from the SQL Server. * * @param buf challenge BLOB * @param size challenge BLOB size * @return NTLM TYPE-3 message */ private native byte[] prepareSSOSubmit(byte[] buf, long size); static { try { System.loadLibrary("ntlmauth"); SSPIJNIClient.libraryLoaded = true; } catch (UnsatisfiedLinkError err) { Logger.println("Unable to load library: " + err); } } /** * Private constructor for singleton. */ private SSPIJNIClient() { //empty constructor } /** * Returns the singleton <code>SSPIJNIClient</code> instance. * * @throws SQLException if an error occurs during initialization */ public static synchronized SSPIJNIClient getInstance() throws Exception { if (thisInstance == null) { if (!libraryLoaded) { throw new Exception("Native SSPI library not loaded. " + "Check the java.library.path system property."); } thisInstance = new SSPIJNIClient(); thisInstance.invokeInitialize(); } return thisInstance; } /** * Calls <code>#initialize()</code> if the SSPI client is not already inited. */ public void invokeInitialize() { if (!initialized) { initialize(); initialized = true; } } /** * Calls <code>#unInitialize()</code> if the SSPI client is inited. */ public void invokeUnInitialize() { if (initialized) { unInitialize(); initialized = false; } } /** * Calls <code>#prepareSSORequest()</code> to prepare the NTLM TYPE-1 message. * * @throws Exception if an error occurs during the call or the SSPI client * is uninitialized */ public byte[] invokePrepareSSORequest() throws Exception { if (!initialized) { throw new Exception("SSPI Not Initialized"); } return prepareSSORequest(); } /** * Calls <code>#prepareSSOSubmit(byte[], long)</code> to prepare the NTLM TYPE-3 * message. * * @throws Exception if an error occurs during the call or the SSPI client * is uninitialized */ public byte[] invokePrepareSSOSubmit(byte[] buf) throws Exception { if (!initialized) { throw new Exception("SSPI Not Initialized"); } return prepareSSOSubmit(buf, buf.length); } }
⏎ net/sourceforge/jtds/util/SSPIJNIClient.java
Or download all of them as a single archive file:
File name: jtds-1.3.1-fyi.zip File size: 323160 bytes Release date: 2013-06-08 Download
⇐ What Is jtds-1.3.1-dist.zip?
2016-11-26, 8594👍, 0💬
Popular Posts:
How to download and install ojdbc6.jar for Oracle 11g R2? ojdbc6.jar for Oracle 11g R2 is a Java 6, ...
ZooKeeper is a centralized service for maintaining configuration information, naming, providing dist...
Apache Log4j API provides the interface that applications should code to and provides the adapter co...
JLayer is a library that decodes/plays/converts MPEG 1/2/2.5 Layer 1/2/3 (i.e. MP3) in real time for...
commons-io-1.4.jar is the JAR file for Commons IO 1.4, which is a library of utilities to assist wit...