KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ch > ethz > ssh2 > packets > PacketKexDhGexRequestOld


1
2 package ch.ethz.ssh2.packets;
3
4 import ch.ethz.ssh2.DHGexParameters;
5
6 /**
7  * PacketKexDhGexRequestOld.
8  *
9  * @author Christian Plattner, plattner@inf.ethz.ch
10  * @version $Id: PacketKexDhGexRequestOld.java,v 1.2 2006/09/20 12:52:46 cplattne Exp $
11  */

12 public class PacketKexDhGexRequestOld
13 {
14     byte[] payload;
15
16     int n;
17
18     public PacketKexDhGexRequestOld(DHGexParameters para)
19     {
20         this.n = para.getPref_group_len();
21     }
22
23     public byte[] getPayload()
24     {
25         if (payload == null)
26         {
27             TypesWriter tw = new TypesWriter();
28             tw.writeByte(Packets.SSH_MSG_KEX_DH_GEX_REQUEST_OLD);
29             tw.writeUINT32(n);
30             payload = tw.getBytes();
31         }
32         return payload;
33     }
34 }
35
Popular Tags