01: package ch.ethz.ssh2.packets;
02:
03: import java.math.BigInteger;
04:
05: /**
06: * PacketKexDHInit.
07: *
08: * @author Christian Plattner, plattner@inf.ethz.ch
09: * @version $Id: PacketKexDHInit.java,v 1.2 2005/08/24 17:54:09 cplattne Exp $
10: */
11: public class PacketKexDHInit {
12: byte[] payload;
13:
14: BigInteger e;
15:
16: public PacketKexDHInit(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_KEXDH_INIT);
24: tw.writeMPInt(e);
25: payload = tw.getBytes();
26: }
27: return payload;
28: }
29: }
|