1 package ch.ethz.ssh2.packets; 2 3 import ch.ethz.ssh2.DHGexParameters; 4 5 11 public class PacketKexDhGexRequest 12 { 13 byte[] payload; 14 15 int min; 16 int n; 17 int max; 18 19 public PacketKexDhGexRequest(DHGexParameters para) 20 { 21 this.min = para.getMin_group_len(); 22 this.n = para.getPref_group_len(); 23 this.max = para.getMax_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); 32 tw.writeUINT32(min); 33 tw.writeUINT32(n); 34 tw.writeUINT32(max); 35 payload = tw.getBytes(); 36 } 37 return payload; 38 } 39 } 40 | Popular Tags |