short encodedAppReplyLength = buf.getShort();
byte[] encodedAppReply = new byte[encodedAppReplyLength];
buf.get( encodedAppReply );
ApRep applicationReply = KerberosDecoder.decodeApRep( encodedAppReply );
int privateBytesLength = messageLength - HEADER_LENGTH - encodedAppReplyLength;
byte[] encodedPrivateMessage = new byte[privateBytesLength];
buf.get( encodedPrivateMessage );
PrivateMessageDecoder privateDecoder = new PrivateMessageDecoder();
PrivateMessage privateMessage = privateDecoder.decode( encodedPrivateMessage );
applicationReply.setPrivateMessage( privateMessage );
return applicationReply.getChangePasswordReply();
}