private String getEncryptionAlgorithm(Element element) throws WSSecurityException
{
element = Util.findElement(element, "EncryptionMethod", Constants.XML_ENCRYPTION_NS);
if (element == null)
throw new InvalidSecurityHeaderException("Encrypted element corrupted, no encryption method");
String alg = element.getAttribute("Algorithm");
if (alg == null || alg.length() == 0)
throw new InvalidSecurityHeaderException("Encrypted element corrupted, no algorithm specified");
return alg;
}