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 ch.ethz.ssh2.DHGexParameters;
      8 
      9 /**
     10  * PacketKexDhGexRequestOld.
     11  *
     12  * @author Christian Plattner
     13  * @version 2.50, 03/15/10
     14  */
     15 public class PacketKexDhGexRequestOld
     16 {
     17 	byte[] payload;
     18 
     19 	int n;
     20 
     21 	public PacketKexDhGexRequestOld(DHGexParameters para)
     22 	{
     23 		this.n = para.getPref_group_len();
     24 	}
     25 
     26 	public byte[] getPayload()
     27 	{
     28 		if (payload == null)
     29 		{
     30 			TypesWriter tw = new TypesWriter();
     31 			tw.writeByte(Packets.SSH_MSG_KEX_DH_GEX_REQUEST_OLD);
     32 			tw.writeUINT32(n);
     33 			payload = tw.getBytes();
     34 		}
     35 		return payload;
     36 	}
     37 }
     38