comparison src/com/trilead/ssh2/packets/PacketKexDhGexInit.java @ 0:0ce5cc452d02

initial version
author Carl Byington <carl@five-ten-sg.com>
date Thu, 22 May 2014 10:41:19 -0700
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:0ce5cc452d02
1 package com.trilead.ssh2.packets;
2
3 import java.math.BigInteger;
4
5 /**
6 * PacketKexDhGexInit.
7 *
8 * @author Christian Plattner, plattner@trilead.com
9 * @version $Id: PacketKexDhGexInit.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $
10 */
11 public class PacketKexDhGexInit {
12 byte[] payload;
13
14 BigInteger e;
15
16 public PacketKexDhGexInit(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_KEX_DH_GEX_INIT);
24 tw.writeMPInt(e);
25 payload = tw.getBytes();
26 }
27
28 return payload;
29 }
30 }