01: package ch.ethz.ssh2.packets;
02:
03: import ch.ethz.ssh2.DHGexParameters;
04:
05: /**
06: * PacketKexDhGexRequestOld.
07: *
08: * @author Christian Plattner, plattner@inf.ethz.ch
09: * @version $Id: PacketKexDhGexRequestOld.java,v 1.2 2006/09/20 12:52:46 cplattne Exp $
10: */
11: public class PacketKexDhGexRequestOld {
12: byte[] payload;
13:
14: int n;
15:
16: public PacketKexDhGexRequestOld(DHGexParameters para) {
17: this .n = para.getPref_group_len();
18: }
19:
20: public byte[] getPayload() {
21: if (payload == null) {
22: TypesWriter tw = new TypesWriter();
23: tw.writeByte(Packets.SSH_MSG_KEX_DH_GEX_REQUEST_OLD);
24: tw.writeUINT32(n);
25: payload = tw.getBytes();
26: }
27: return payload;
28: }
29: }
|