public ContentEncryptionAlgorithm getContentEncryptionAlgorithm() throws InvalidAlgorithmException
{
String encValue = getEncryptionMethodHeaderParameter();
if (encValue == null)
{
throw new InvalidAlgorithmException("Content encryption header ("+HeaderParameterNames.ENCRYPTION_METHOD+") not set.");
}
contentEncryptionAlgorithmConstraints.checkConstraint(encValue);
AlgorithmFactoryFactory factoryFactory = AlgorithmFactoryFactory.getInstance();
AlgorithmFactory<ContentEncryptionAlgorithm> factory = factoryFactory.getJweContentEncryptionAlgorithmFactory();