Mercurial > 510Connectbot
comparison app/src/main/java/ch/ethz/ssh2/packets/PacketUserauthRequestInteractive.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/PacketUserauthRequestInteractive.java@071eccdff8ea |
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 /** | |
8 * @author Christian Plattner | |
9 * @version $Id: PacketUserauthRequestInteractive.java 160 2014-05-01 14:30:26Z dkocher@sudo.ch $ | |
10 */ | |
11 public final class PacketUserauthRequestInteractive { | |
12 | |
13 private final byte[] payload; | |
14 | |
15 public PacketUserauthRequestInteractive(String serviceName, String user, String[] submethods) { | |
16 TypesWriter tw = new TypesWriter(); | |
17 tw.writeByte(Packets.SSH_MSG_USERAUTH_REQUEST); | |
18 tw.writeString(user); | |
19 tw.writeString(serviceName); | |
20 tw.writeString("keyboard-interactive"); | |
21 tw.writeString(""); // draft-ietf-secsh-newmodes-04.txt says that | |
22 // the language tag should be empty. | |
23 tw.writeNameList(null == submethods ? new String[] {} : submethods); | |
24 payload = tw.getBytes(); | |
25 } | |
26 | |
27 public byte[] getPayload() { | |
28 return payload; | |
29 } | |
30 } |