1 /* 2 * Copyright (c) 2006-2011 Christian Plattner. All rights reserved. 3 * Please refer to the LICENSE.txt for licensing details. 4 */ 5 package ch.ethz.ssh2.packets; 6 7 import java.math.BigInteger; 8 9 /** 10 * PacketKexDhGexInit. 11 * 12 * @author Christian Plattner 13 * @version 2.50, 03/15/10 14 */ 15 public class PacketKexDhGexInit 16 { 17 byte[] payload; 18 19 BigInteger e; 20 PacketKexDhGexInit(BigInteger e)21 public PacketKexDhGexInit(BigInteger e) 22 { 23 this.e = e; 24 } 25 getPayload()26 public byte[] getPayload() 27 { 28 if (payload == null) 29 { 30 TypesWriter tw = new TypesWriter(); 31 tw.writeByte(Packets.SSH_MSG_KEX_DH_GEX_INIT); 32 tw.writeMPInt(e); 33 payload = tw.getBytes(); 34 } 35 return payload; 36 } 37 } 38