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 * PacketUserauthInfoResponse. 9 * 10 * @author Christian Plattner 11 * @version 2.50, 03/15/10 12 */ 13 public class PacketUserauthInfoResponse 14 { 15 byte[] payload; 16 17 String[] responses; 18 19 public PacketUserauthInfoResponse(String[] responses) 20 { 21 this.responses = responses; 22 } 23 24 public byte[] getPayload() 25 { 26 if (payload == null) 27 { 28 TypesWriter tw = new TypesWriter(); 29 tw.writeByte(Packets.SSH_MSG_USERAUTH_INFO_RESPONSE); 30 tw.writeUINT32(responses.length); 31 for (int i = 0; i < responses.length; i++) 32 tw.writeString(responses[i]); 33 34 payload = tw.getBytes(); 35 } 36 return payload; 37 } 38 } 39