aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/ch/ethz/ssh2/packets/PacketKexDhGexInit.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/ch/ethz/ssh2/packets/PacketKexDhGexInit.java')
-rw-r--r--src/main/java/ch/ethz/ssh2/packets/PacketKexDhGexInit.java37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/main/java/ch/ethz/ssh2/packets/PacketKexDhGexInit.java b/src/main/java/ch/ethz/ssh2/packets/PacketKexDhGexInit.java
new file mode 100644
index 0000000..0726029
--- /dev/null
+++ b/src/main/java/ch/ethz/ssh2/packets/PacketKexDhGexInit.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2006-2011 Christian Plattner. All rights reserved.
+ * Please refer to the LICENSE.txt for licensing details.
+ */
+package ch.ethz.ssh2.packets;
+
+import java.math.BigInteger;
+
+/**
+ * PacketKexDhGexInit.
+ *
+ * @author Christian Plattner
+ * @version 2.50, 03/15/10
+ */
+public class PacketKexDhGexInit
+{
+ byte[] payload;
+
+ BigInteger e;
+
+ public PacketKexDhGexInit(BigInteger e)
+ {
+ this.e = e;
+ }
+
+ public byte[] getPayload()
+ {
+ if (payload == null)
+ {
+ TypesWriter tw = new TypesWriter();
+ tw.writeByte(Packets.SSH_MSG_KEX_DH_GEX_INIT);
+ tw.writeMPInt(e);
+ payload = tw.getBytes();
+ }
+ return payload;
+ }
+}