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