*/
private static byte[] preparePreAuthenticationError( Set<EncryptionType> encryptionTypes )
{
PaData[] paDataSequence = new PaData[2];
PaData paData = new PaData();
paData.setPaDataType( PaDataType.PA_ENC_TIMESTAMP );
paData.setPaDataValue( new byte[0] );
paDataSequence[0] = paData;
EncryptionTypeInfoEntry[] entries = new EncryptionTypeInfoEntry[ encryptionTypes.size() ];
int i = 0;
for ( EncryptionType encryptionType:encryptionTypes )
{
entries[i++] = new EncryptionTypeInfoEntry( encryptionType, null );
}
byte[] encTypeInfo = null;
try
{
encTypeInfo = EncryptionTypeInfoEncoder.encode( entries );
}
catch ( IOException ioe )
{
return null;
}
PaData encType = new PaData();
encType.setPaDataType( PaDataType.PA_ENCTYPE_INFO );
encType.setPaDataValue( encTypeInfo );
paDataSequence[1] = encType;
try
{