//EncryptedKey
WSSecEncryptedKey encrKeyBuilder = new WSSecEncryptedKey();
encrKeyBuilder.setUserInfo("wss4jcert");
encrKeyBuilder.setKeyIdentifierType(WSConstants.THUMBPRINT_IDENTIFIER);
encrKeyBuilder.prepare(doc, crypto);
//Key information from the EncryptedKey
byte[] ek = encrKeyBuilder.getEphemeralKey();
String tokenIdentifier = encrKeyBuilder.getId();