comparison app/src/main/java/ch/ethz/ssh2/packets/PacketKexDhGexRequest.java @ 438:d29cce60f393

migrate from Eclipse to Android Studio
author Carl Byington <carl@five-ten-sg.com>
date Thu, 03 Dec 2015 11:23:55 -0800
parents src/ch/ethz/ssh2/packets/PacketKexDhGexRequest.java@91a31873c42a
children
comparison
equal deleted inserted replaced
437:208b31032318 438:d29cce60f393
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 * @author Christian Plattner
11 * @version $Id: PacketKexDhGexRequest.java 160 2014-05-01 14:30:26Z dkocher@sudo.ch $
12 */
13 public final class PacketKexDhGexRequest {
14 private final byte[] payload;
15
16 public PacketKexDhGexRequest(DHGexParameters para) {
17 TypesWriter tw = new TypesWriter();
18 tw.writeByte(Packets.SSH_MSG_KEX_DH_GEX_REQUEST);
19 tw.writeUINT32(para.getMin_group_len());
20 tw.writeUINT32(para.getPref_group_len());
21 tw.writeUINT32(para.getMax_group_len());
22 payload = tw.getBytes();
23 }
24
25 public byte[] getPayload() {
26 return payload;
27 }
28 }