comparison src/com/trilead/ssh2/packets/PacketKexDHInit.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 /**
4 * PacketKexDHInit.
5 *
6 * @author Christian Plattner, plattner@trilead.com
7 * @version $Id: PacketKexDHInit.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $
8 */
9 public class PacketKexDHInit {
10 byte[] payload;
11
12 byte[] publicKey;
13
14 public PacketKexDHInit(byte[] publicKey) {
15 this.publicKey = publicKey;
16 }
17
18 public byte[] getPayload() {
19 if (payload == null) {
20 TypesWriter tw = new TypesWriter();
21 tw.writeByte(Packets.SSH_MSG_KEXDH_INIT);
22 tw.writeString(publicKey, 0, publicKey.length);
23 payload = tw.getBytes();
24 }
25
26 return payload;
27 }
28 }