01: package ch.ethz.ssh2.packets;
02:
03: /**
04: * PacketUserauthInfoResponse.
05: *
06: * @author Christian Plattner, plattner@inf.ethz.ch
07: * @version $Id: PacketUserauthInfoResponse.java,v 1.3 2005/08/24 17:54:09 cplattne Exp $
08: */
09: public class PacketUserauthInfoResponse {
10: byte[] payload;
11:
12: String[] responses;
13:
14: public PacketUserauthInfoResponse(String[] responses) {
15: this .responses = responses;
16: }
17:
18: public byte[] getPayload() {
19: if (payload == null) {
20: TypesWriter tw = new TypesWriter();
21: tw.writeByte(Packets.SSH_MSG_USERAUTH_INFO_RESPONSE);
22: tw.writeUINT32(responses.length);
23: for (int i = 0; i < responses.length; i++)
24: tw.writeString(responses[i]);
25:
26: payload = tw.getBytes();
27: }
28: return payload;
29: }
30: }
|