Home | History | Annotate | Download | only in packets
      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  * PacketKexDHInit.
     11  *
     12  * @author Christian Plattner
     13  * @version 2.50, 03/15/10
     14  */
     15 public class PacketKexDHInit
     16 {
     17 	byte[] payload;
     18 
     19 	BigInteger e;
     20 
     21 	public PacketKexDHInit(BigInteger e)
     22 	{
     23 		this.e = e;
     24 	}
     25 
     26 	public byte[] getPayload()
     27 	{
     28 		if (payload == null)
     29 		{
     30 			TypesWriter tw = new TypesWriter();
     31 			tw.writeByte(Packets.SSH_MSG_KEXDH_INIT);
     32 			tw.writeMPInt(e);
     33 			payload = tw.getBytes();
     34 		}
     35 		return payload;
     36 	}
     37 }
     38