}
EncryptionType encryptionType = clientTgtReq.getETypes().iterator().next();
EncryptionKey clientKey = KerberosKeyFactory.string2Key( clientTgtReq.getClientPrincipal(), clientTgtReq.getPassword(), encryptionType );
AsReq req = new AsReq();
req.setKdcReqBody( body );
if ( clientTgtReq.isPreAuthEnabled() )
{
PaEncTsEnc tmstmp = new PaEncTsEnc();
tmstmp.setPaTimestamp( new KerberosTime() );
EncryptedData paDataValue = cipherTextHandler.encrypt( clientKey, getEncoded( tmstmp ), KeyUsage.AS_REQ_PA_ENC_TIMESTAMP_WITH_CKEY );
PaData paEncTstmp = new PaData();
paEncTstmp.setPaDataType( PaDataType.PA_ENC_TIMESTAMP );
paEncTstmp.setPaDataValue( getEncoded( paDataValue ) );
req.addPaData( paEncTstmp );
}
// Get the result from the future
try
{