final EncryptedKey encKey = encryptKey(key, serCert);
encKeyInfo.getContent().add(encKey);
final EncryptedDataType edt = createEncryptedData(id,MessageConstants.AES_BLOCK_ENCRYPTION_256,encKeyInfo,false);
final JAXBEncryptedData jed = new JAXBEncryptedData(edt,new SSEData((SecurityElement)signedAssertion,false,nsContext),soapVersion);
token = new GenericToken(jed);
}else{
token = new GenericToken(signedAssertion);
}
} catch (XWSSecurityException ex){