EncryptionType[] configuredEncryptionTypes =
{ EncryptionType.AES128_CTS_HMAC_SHA1_96 };
config.setEncryptionTypes( configuredEncryptionTypes );
// Get the mutable ticket part.
KerberosPrincipal clientPrincipal = new KerberosPrincipal( "hnelson@EXAMPLE.COM" );
EncTicketPart encTicketPart = getTicketArchetype( clientPrincipal );
// Make changes to test.
sessionKey = RandomKeyFactory.getRandomKey( EncryptionType.AES128_CTS_HMAC_SHA1_96 );
encTicketPart.setKey( sessionKey );
// Seal the ticket for the server.
String principalName = "krbtgt/EXAMPLE.COM@EXAMPLE.COM";
KerberosPrincipal serverPrincipal = new KerberosPrincipal( principalName );
String passPhrase = "randomKey";
Set<EncryptionType> preAuthEncryptionTypes = new HashSet<EncryptionType>();
preAuthEncryptionTypes.add( EncryptionType.AES128_CTS_HMAC_SHA1_96 );
Map<EncryptionType, EncryptionKey> keyMap = KerberosKeyFactory.getKerberosKeys( principalName, passPhrase,