本文整理汇总了Java中com.trilead.ssh2.crypto.CryptoWishList类的典型用法代码示例。如果您正苦于以下问题:Java CryptoWishList类的具体用法?Java CryptoWishList怎么用?Java CryptoWishList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CryptoWishList类属于com.trilead.ssh2.crypto包,在下文中一共展示了CryptoWishList类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: PacketKexInit
import com.trilead.ssh2.crypto.CryptoWishList; //导入依赖的package包/类
public PacketKexInit(CryptoWishList cwl)
{
kp.cookie = new byte[16];
new SecureRandom().nextBytes(kp.cookie);
kp.kex_algorithms = cwl.kexAlgorithms;
kp.server_host_key_algorithms = cwl.serverHostKeyAlgorithms;
kp.encryption_algorithms_client_to_server = cwl.c2s_enc_algos;
kp.encryption_algorithms_server_to_client = cwl.s2c_enc_algos;
kp.mac_algorithms_client_to_server = cwl.c2s_mac_algos;
kp.mac_algorithms_server_to_client = cwl.s2c_mac_algos;
kp.compression_algorithms_client_to_server = cwl.c2s_comp_algos;
kp.compression_algorithms_server_to_client = cwl.s2c_comp_algos;
kp.languages_client_to_server = new String[] {};
kp.languages_server_to_client = new String[] {};
kp.first_kex_packet_follows = false;
kp.reserved_field1 = 0;
}
开发者ID:dragonlinux,项目名称:connectbot,代码行数:19,代码来源:PacketKexInit.java
示例2: PacketKexInit
import com.trilead.ssh2.crypto.CryptoWishList; //导入依赖的package包/类
public PacketKexInit(CryptoWishList cwl, SecureRandom rnd)
{
kp.cookie = new byte[16];
rnd.nextBytes(kp.cookie);
kp.kex_algorithms = cwl.kexAlgorithms;
kp.server_host_key_algorithms = cwl.serverHostKeyAlgorithms;
kp.encryption_algorithms_client_to_server = cwl.c2s_enc_algos;
kp.encryption_algorithms_server_to_client = cwl.s2c_enc_algos;
kp.mac_algorithms_client_to_server = cwl.c2s_mac_algos;
kp.mac_algorithms_server_to_client = cwl.s2c_mac_algos;
kp.compression_algorithms_client_to_server = new String[] { "none" };
kp.compression_algorithms_server_to_client = new String[] { "none" };
kp.languages_client_to_server = new String[] {};
kp.languages_server_to_client = new String[] {};
kp.first_kex_packet_follows = false;
kp.reserved_field1 = 0;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:PacketKexInit.java
示例3: PacketKexInit
import com.trilead.ssh2.crypto.CryptoWishList; //导入依赖的package包/类
public PacketKexInit(CryptoWishList cwl, SecureRandom rnd) {
kp.cookie = new byte[16];
rnd.nextBytes(kp.cookie);
kp.kex_algorithms = cwl.kexAlgorithms;
kp.server_host_key_algorithms = cwl.serverHostKeyAlgorithms;
kp.encryption_algorithms_client_to_server = cwl.c2s_enc_algos;
kp.encryption_algorithms_server_to_client = cwl.s2c_enc_algos;
kp.mac_algorithms_client_to_server = cwl.c2s_mac_algos;
kp.mac_algorithms_server_to_client = cwl.s2c_mac_algos;
kp.compression_algorithms_client_to_server = cwl.c2s_comp_algos;
kp.compression_algorithms_server_to_client = cwl.s2c_comp_algos;
kp.languages_client_to_server = new String[] {};
kp.languages_server_to_client = new String[] {};
kp.first_kex_packet_follows = false;
kp.reserved_field1 = 0;
}
开发者ID:jianlinwei,项目名称:sshtunnel,代码行数:18,代码来源:PacketKexInit.java
示例4: PacketKexInit
import com.trilead.ssh2.crypto.CryptoWishList; //导入依赖的package包/类
public PacketKexInit(CryptoWishList cwl, SecureRandom rnd)
{
kp.cookie = new byte[16];
rnd.nextBytes(kp.cookie);
kp.kex_algorithms = cwl.kexAlgorithms;
kp.server_host_key_algorithms = cwl.serverHostKeyAlgorithms;
kp.encryption_algorithms_client_to_server = cwl.c2s_enc_algos;
kp.encryption_algorithms_server_to_client = cwl.s2c_enc_algos;
kp.mac_algorithms_client_to_server = cwl.c2s_mac_algos;
kp.mac_algorithms_server_to_client = cwl.s2c_mac_algos;
kp.compression_algorithms_client_to_server = cwl.c2s_comp_algos;
kp.compression_algorithms_server_to_client = cwl.s2c_comp_algos;
kp.languages_client_to_server = new String[] {};
kp.languages_server_to_client = new String[] {};
kp.first_kex_packet_follows = false;
kp.reserved_field1 = 0;
}
开发者ID:runsoftdev,项目名称:bVnc,代码行数:19,代码来源:PacketKexInit.java
示例5: KexManager
import com.trilead.ssh2.crypto.CryptoWishList; //导入依赖的package包/类
public KexManager(TransportManager tm, ClientServerHello csh, CryptoWishList initialCwl, String hostname, int port,
ServerHostKeyVerifier keyVerifier, SecureRandom rnd)
{
this.tm = tm;
this.csh = csh;
this.nextKEXcryptoWishList = initialCwl;
this.nextKEXdhgexParameters = new DHGexParameters();
this.hostname = hostname;
this.port = port;
this.verifier = keyVerifier;
this.rnd = rnd;
}
开发者ID:dragonlinux,项目名称:connectbot,代码行数:13,代码来源:KexManager.java
示例6: initiateKEX
import com.trilead.ssh2.crypto.CryptoWishList; //导入依赖的package包/类
public synchronized void initiateKEX(CryptoWishList cwl, DHGexParameters dhgex) throws IOException
{
nextKEXcryptoWishList = cwl;
nextKEXdhgexParameters = dhgex;
if (kxs == null)
{
kxs = new KexState();
kxs.dhgexParameters = nextKEXdhgexParameters;
PacketKexInit kp = new PacketKexInit(nextKEXcryptoWishList);
kxs.localKEX = kp;
tm.sendKexMessage(kp.getPayload());
}
}
开发者ID:dragonlinux,项目名称:connectbot,代码行数:16,代码来源:KexManager.java
示例7: initiateKEX
import com.trilead.ssh2.crypto.CryptoWishList; //导入依赖的package包/类
public synchronized void initiateKEX(CryptoWishList cwl, DHGexParameters dhgex) throws IOException
{
nextKEXcryptoWishList = cwl;
nextKEXdhgexParameters = dhgex;
if (kxs == null)
{
kxs = new KexState();
kxs.dhgexParameters = nextKEXdhgexParameters;
PacketKexInit kp = new PacketKexInit(nextKEXcryptoWishList, rnd);
kxs.localKEX = kp;
tm.sendKexMessage(kp.getPayload());
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:KexManager.java
示例8: KexManager
import com.trilead.ssh2.crypto.CryptoWishList; //导入依赖的package包/类
public KexManager(TransportManager tm, ClientServerHello csh,
CryptoWishList initialCwl, String hostname, int port,
ServerHostKeyVerifier keyVerifier, SecureRandom rnd) {
this.tm = tm;
this.csh = csh;
this.nextKEXcryptoWishList = initialCwl;
this.nextKEXdhgexParameters = new DHGexParameters();
this.hostname = hostname;
this.port = port;
this.verifier = keyVerifier;
this.rnd = rnd;
}
开发者ID:jianlinwei,项目名称:sshtunnel,代码行数:13,代码来源:KexManager.java
示例9: initiateKEX
import com.trilead.ssh2.crypto.CryptoWishList; //导入依赖的package包/类
public synchronized void initiateKEX(CryptoWishList cwl,
DHGexParameters dhgex) throws IOException {
nextKEXcryptoWishList = cwl;
nextKEXdhgexParameters = dhgex;
if (kxs == null) {
kxs = new KexState();
kxs.dhgexParameters = nextKEXdhgexParameters;
PacketKexInit kp = new PacketKexInit(nextKEXcryptoWishList, rnd);
kxs.localKEX = kp;
tm.sendKexMessage(kp.getPayload());
}
}
开发者ID:jianlinwei,项目名称:sshtunnel,代码行数:15,代码来源:KexManager.java
示例10: initialize
import com.trilead.ssh2.crypto.CryptoWishList; //导入依赖的package包/类
public void initialize(CryptoWishList cwl, ServerHostKeyVerifier verifier, DHGexParameters dhgex,
int connectTimeout, SecureRandom rnd, ProxyData proxyData) throws IOException
{
/* First, establish the TCP connection to the SSH-2 server */
establishConnection(proxyData, connectTimeout);
/* Parse the server line and say hello - important: this information is later needed for the
* key exchange (to stop man-in-the-middle attacks) - that is why we wrap it into an object
* for later use.
*/
ClientServerHello csh = new ClientServerHello(sock.getInputStream(), sock.getOutputStream());
tc = new TransportConnection(sock.getInputStream(), sock.getOutputStream(), rnd);
km = new KexManager(this, csh, cwl, hostname, port, verifier, rnd);
km.initiateKEX(cwl, dhgex);
receiveThread = new Thread(new Runnable()
{
public void run()
{
try
{
receiveLoop();
}
catch (IOException e)
{
close(e, false);
if (log.isEnabled())
log.log(10, "Receive thread: error in receiveLoop: " + e.getMessage());
}
if (log.isEnabled())
log.log(50, "Receive thread: back from receiveLoop");
/* Tell all handlers that it is time to say goodbye */
if (km != null)
{
try
{
km.handleMessage(null, 0);
}
catch (IOException e)
{
}
}
for (int i = 0; i < messageHandlers.size(); i++)
{
HandlerEntry he = messageHandlers.elementAt(i);
try
{
he.mh.handleMessage(null, 0);
}
catch (Exception ignore)
{
}
}
}
});
receiveThread.setDaemon(true);
receiveThread.start();
}
开发者ID:dragonlinux,项目名称:connectbot,代码行数:69,代码来源:TransportManager.java
示例11: forceKeyExchange
import com.trilead.ssh2.crypto.CryptoWishList; //导入依赖的package包/类
public void forceKeyExchange(CryptoWishList cwl, DHGexParameters dhgex) throws IOException
{
km.initiateKEX(cwl, dhgex);
}
开发者ID:dragonlinux,项目名称:connectbot,代码行数:5,代码来源:TransportManager.java
示例12: initialize
import com.trilead.ssh2.crypto.CryptoWishList; //导入依赖的package包/类
public void initialize(CryptoWishList cwl, ServerHostKeyVerifier verifier, DHGexParameters dhgex,
int connectTimeout, SecureRandom rnd, ProxyData proxyData) throws IOException
{
/* First, establish the TCP connection to the SSH-2 server */
sock = SocketFactory.open(hostname, port, proxyData, connectTimeout);
/* Parse the server line and say hello - important: this information is later needed for the
* key exchange (to stop man-in-the-middle attacks) - that is why we wrap it into an object
* for later use.
*/
myCsh = new ClientServerHello(sock.getInputStream(), sock.getOutputStream());
tc = new TransportConnection(sock.getInputStream(), sock.getOutputStream(), rnd);
km = new KexManager(this, myCsh, cwl, hostname, port, verifier, rnd);
km.initiateKEX(cwl, dhgex);
receiveThread = new Thread(new Runnable()
{
public void run()
{
try
{
receiveLoop();
}
catch (IOException e)
{
close(e, false);
if (log.isEnabled())
log.log(10, "Receive thread: error in receiveLoop: " + e.getMessage());
}
if (log.isEnabled())
log.log(50, "Receive thread: back from receiveLoop");
/* Tell all handlers that it is time to say goodbye */
if (km != null)
{
try
{
km.handleMessage(null, 0);
}
catch (IOException e)
{
}
}
for (int i = 0; i < messageHandlers.size(); i++)
{
HandlerEntry he = (HandlerEntry) messageHandlers.elementAt(i);
try
{
he.mh.handleMessage(null, 0);
}
catch (Exception ignore)
{
}
}
}
});
receiveThread.setDaemon(true);
receiveThread.start();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:69,代码来源:TransportManager.java
示例13: forceKeyExchange
import com.trilead.ssh2.crypto.CryptoWishList; //导入依赖的package包/类
public void forceKeyExchange(CryptoWishList cwl, DHGexParameters dhgex)
throws IOException {
km.initiateKEX(cwl, dhgex);
}
开发者ID:jianlinwei,项目名称:sshtunnel,代码行数:5,代码来源:TransportManager.java
示例14: initialize
import com.trilead.ssh2.crypto.CryptoWishList; //导入依赖的package包/类
public void initialize(CryptoWishList cwl, ServerHostKeyVerifier verifier,
DHGexParameters dhgex, int connectTimeout, SecureRandom rnd,
ProxyData proxyData) throws IOException {
/* First, establish the TCP connection to the SSH-2 server */
establishConnection(proxyData, connectTimeout);
/*
* Parse the server line and say hello - important: this information is
* later needed for the key exchange (to stop man-in-the-middle attacks)
* - that is why we wrap it into an object for later use.
*/
ClientServerHello csh = new ClientServerHello(sock.getInputStream(),
sock.getOutputStream());
tc = new TransportConnection(sock.getInputStream(),
sock.getOutputStream(), rnd);
km = new KexManager(this, csh, cwl, hostname, port, verifier, rnd);
km.initiateKEX(cwl, dhgex);
receiveThread = new Thread(new Runnable() {
@Override
public void run() {
try {
receiveLoop();
} catch (IOException e) {
close(e, false);
if (log.isEnabled())
log.log(10, "Receive thread: error in receiveLoop: "
+ e.getMessage());
}
if (log.isEnabled())
log.log(50, "Receive thread: back from receiveLoop");
/* Tell all handlers that it is time to say goodbye */
if (km != null) {
try {
km.handleMessage(null, 0);
} catch (IOException e) {
}
}
for (int i = 0; i < messageHandlers.size(); i++) {
HandlerEntry he = messageHandlers.elementAt(i);
try {
he.mh.handleMessage(null, 0);
} catch (Exception ignore) {
}
}
}
});
receiveThread.setDaemon(true);
receiveThread.start();
}
开发者ID:jianlinwei,项目名称:sshtunnel,代码行数:61,代码来源:TransportManager.java
注:本文中的com.trilead.ssh2.crypto.CryptoWishList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论