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