EncryptionKey subSessionKey = authenticator.getSubKey();
// decrypt the request's private message with the subsession key
EncryptedData encReqPrivPart = request.getPrivateMessage().getEncPart();
ChangePasswdData passwordData = null;
try
{
byte[] decryptedData = cipherTextHandler.decrypt( subSessionKey, encReqPrivPart, KeyUsage.KRB_PRIV_ENC_PART_CHOSEN_KEY );
EncKrbPrivPart privatePart = KerberosDecoder.decodeEncKrbPrivPart( decryptedData );
if( authenticator.getSeqNumber() != privatePart.getSeqNumber() )
{
throw new ChangePasswordException( ChangePasswdErrorType.KRB5_KPASSWD_MALFORMED );
}
if ( request.getVersionNumber() == AbstractPasswordMessage.OLD_PVNO )
{
passwordData = new ChangePasswdData();
passwordData.setNewPasswd( privatePart.getUserData() );
}
else
{
Asn1Decoder passwordDecoder = new Asn1Decoder();
ByteBuffer stream = ByteBuffer.wrap( privatePart.getUserData() );